5

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

Community
  • 1
  • 1
Nixit Patel
  • 4,285
  • 5
  • 26
  • 54

2 Answers2

5

No.. It wont.. You need to set it again when phone Boots .. something like this

ngesh
  • 13,044
  • 4
  • 41
  • 59
1

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/