I have created BroadcastReceiver to schedule my Service execution every 30 seconds. This is what I have in AndroidManifest.xml :
<receiver android:name="MyScheduleReceiver" > <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.QUICKBOOT_POWERON" /> </intent-filter> </receiver>
This is working great now, but only after I added QUICKBOOT_POWERON action. Before that I had only BOOT_COMPLETED and when I reboot emulator or phone while debugging, my service would never start. So my question is what is the difference between these two and when to use each?
Intent android.intent.action.BOOT_COMPLETED
is received after a "cold" boot.
Intent android.intent.action.QUICKBOOT_POWERON
is received after a "restart" or a "reboot".
Check here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With