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

2

7

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!

Cavefish answered 1/3, 2012 at 23:37 Comment(2)
It shouldn't broadcast BOOT_COMPLETED because it isn't really rebooting.Ullund
well i understand that, but the user does see it as rebooting so do you have any good idea of an alternative broadcast to listen to?Pyrogen
R
3

try

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

and

<action android:name="android.intent.action.QUICKBOOT_POWEROFF" />
Roi answered 27/8, 2013 at 14:5 Comment(1)
Great answer anyways! I don't need it anymore but good too know!Pyrogen
I
6

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" />
Intersection answered 11/9, 2013 at 14:20 Comment(2)
You mean in addition to Android's? Else it is really bad news. Also could you name which devices or OS versions are affected?Thimbleweed
Yes in addition to androids for the OEMs that follow Android OS practise. I can see it on the HTC One X (OS version 4.1.1) so could be across that line and more than likely for all HTCs from OS 4.0 and upwards.Intersection
R
3

try

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

and

<action android:name="android.intent.action.QUICKBOOT_POWEROFF" />
Roi answered 27/8, 2013 at 14:5 Comment(1)
Great answer anyways! I don't need it anymore but good too know!Pyrogen

© 2022 - 2024 — McMap. All rights reserved.