Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTC's "fast boot" is not broadcasting BOOT_COMPLETED intent nor wiping intents from alarm manager

Tags:

android

I am making an alarm app but have run into a bit of a problem regarding HTC's "fast boot" feature. this feature puts the device into a deep hibernation instead of turning the device.

The problem this gives me is that because the phone is not turning off (although this is how users perceive it) it is not wiping my intents from the alarm manager making all my alarms go off directly the user turns his phone back on (if alarms have expired that is). This is not the experience i want users to have with my app. I want to notify users on boot via a notification that "X number of alarms went off while your phone was turned off". I can not do this for the formerly mentioned reason and also because event though the phone is "turned off" (no apps running in background, no notifications, nothing) it will not broadcast a BOOT_COMPLETED intent when turned back on.

Does anyone know of a way to work around this? maybe a special intent action used by htc to indicate fast boot events ?

Thanks for any help!

like image 927
Emil Sjölander Avatar asked Mar 01 '12 23:03

Emil Sjölander


2 Answers

HTC use a slightly different intent also for some devices OS 4.0+ that is different from Android SDK.

<action android:name="com.htc.intent.action.QUICKBOOT_POWEROFF" />

and

<action android:name="com.htc.intent.action.QUICKBOOT_POWERON" />
like image 198
young_payters Avatar answered Oct 19 '22 16:10

young_payters


try

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

and

<action android:name="android.intent.action.QUICKBOOT_POWEROFF" />
like image 37
Lovis Avatar answered Oct 19 '22 15:10

Lovis