Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
309 views
in Technique[技术] by (71.8m points)

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

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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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" />

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...