0

After the boot is completed, I want to start a service at a specific time (for example at 3 am) every day, but without repeating, for example, every thirty seconds or minutes, or hour but the alarm must repeat every day at 3 am.

Finally, why the alarm start at 3 am after boot complete and if I restart the device at 3.05 am the alarm wakes up anyway?

Sorry for my English

Riadh Belkebir
  • 797
  • 1
  • 12
  • 34
Edoardo Goffredo
  • 303
  • 2
  • 5
  • 20

1 Answers1

0

You should register BroadcastReceiver, which will be listening for event, broadcasted when device is loaded. This receiver has to run some service (perhaps IntentService), which will figure out what time is now and setup AlarmManager for a specific time.
The second couple Receiver/Service will be handling your alarms. Now use Ordinary Service.

naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259
Alex Shutov
  • 3,217
  • 2
  • 13
  • 11