Reputation: 3389
After a weird issue, I finally got my BootReceiver receiving the BOOT_COMPLETED signal from Android, kind of. It only works for hard power off/power on boots, it doesn't detect restarts from devices like HTC. I have implemented QUICKBOOT intent-filters in my Receivers, but still no luck.
My manifest contains:
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
....
<receiver android:name="com.smashingboxes.speed.BootReceiver"
android:enabled="true" >
<intent-filter>
<action android:name="android.intent.action.ACTION_BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver>
<receiver android:name="com.smashingboxes.speed.ShutdownReceiver" >
<intent-filter>
<action android:name="android.intent.action.ACTION_SHUTDOWN" />
<action android:name="android.intent.action.QUICKBOOT_POWEROFF" />
</intent-filter>
</receiver>
I do not detect Shutdown or Boot if I do a HTC restart. Any ideas why it only seems to be working on hard shutdown/boots?
Upvotes: 2
Views: 970
Reputation: 1007286
AFAIK, those aren't the right "quickboot" actions. There are no actions with the names you have specified in the Android source code.
Try com.htc.intent.action.QUICKBOOT_POWERON
and com.htc.intent.action.QUICKBOOT_POWEROFF
.
Upvotes: 1