Reputation: 4445
I came in to scenario that I want to trigger service on specific time.
What I Know is...
I need use AlarmManager
, and I found this question in hear, Using Alarmmanager to start a service at specific time. Now, I am able to start service on specific time.
Now question I have is... I need 24H interval to start service. now What happens if the phone restart. Is it going to start service again?
How can I make this thing happen? Please help me with this
Thank you
Upvotes: 5
Views: 1023
Reputation: 11
You'll need to register a BroadcastReceiver that can receive the BOOT_COMPLETED message so it receives a message when the phone reboots...
Read this article!
http://karanbalkar.com/2013/07/tutorial-41-using-alarmmanager-and-broadcastreceiver-in-android/
Upvotes: 1