How to schedule my android app to do something every hour

Marqs picture Marqs · Sep 12, 2010 · Viewed 15.1k times · Source

I want my app to access database every hour and read next record from the table then update desctop widget and send notification. I know that there is AlarmManager which I can use to register my Intents but they are deleted when the phone is turned off or rebooted.

Is there any other android class/service that I would update my application continuously even when I reboot my phone?

Thanks,

Answer

Aaron Saunders picture Aaron Saunders · Sep 12, 2010

take a look at the demo applications provided with android sdk

http://developer.android.com/samples/RepeatingAlarm/index.html

the look at AlarmService_Service for the implementation of the service once the alarm has been triggered