Via
Via

Reputation: 29

Can i start activity automatically every 1 hours?

Now i'm making a application that every 20 seconds send data to my database server in internet. but when my activity was running until 2 hours, my application not responding and not send data again to database server. Can i start activity automatically every 1 hours without the help of user??

Upvotes: 1

Views: 689

Answers (1)

Lucifer
Lucifer

Reputation: 29662

Yes, you can use AlarmManager Class or TimerTask Class for such purpose. In AlarmManager you can schedule your activity for every hours. Same as in TimerTask you can schedule your Activity for every hour.

Upvotes: 2

Related Questions