-1

I know that an application can be started on boot by receiving the intent RECEIVE_BOOT_COMPLETED.

Documentation link

I am developing an app which I want to start daily say at 6 AM.

My question is, is RECEIVE_BOOT_COMPLETED enough for this? I mean suppose user doesn't reboots the phone daily. So how to make sure that my app is started daily in the morning ?

As far as I know an alternative is to keep running a service such as this

But if I use that how much resource you think it will consume slowing down overall performance (keeping in mind my app runs always) ?

Thanks in advance.

0x5050
  • 1,095
  • 1
  • 12
  • 30

1 Answers1

1

You can use an Alarm Manager for this as suggested here

Also don't forget to re-register the alarm when the app is rebooted.

Community
  • 1
  • 1
Ayaanp
  • 327
  • 1
  • 12