BOOT_COMPLETED is not working on Android 4.2.2

650 Views Asked by At

I am developing one application in which I need to reset alarms after rebooting the device. The code is working fine in Emulator but on my mobile device which is having Android version 4.2.2 is not working.

I have set a notification on start up, the notification is shown when I run it on Emulator but not on my device.

Please help!

2

There are 2 best solutions below

1
On

Some devices (mostly HTC) has a feature called fast reboot which doesn't trigger BOOT_COMPLETED. Instead they trigger QUICKBOOT_POWERON. So you need to register a recever for both broadcasts.

<action android:name="android.intent.action.QUICKBOOT_POWERON" />

0
On

Thank you All for your giving your precious time!

As CommonsWare said in his comment, I moved it to the internal storage and the BOOT_COMPLETED receiver is working fine.

Thank you all once again!