5

Ever since HTC started using Fastboot settings, apps depending on

android.intent.action.BOOT_COMPLETED

struggle to boot along with the device boot on HTC devices. I have a similar application which depends on the above intent action. But since HTC does its power off and power on differently by using fastboot(other term used - Hibernation) my App never get to work normally. I tried using ACTION_USER_PRESENT and ACTION_SCREEN_ON, but it seemed to be more of hack than a fix for my problem. Do any of you came across same kind of problem and found a better way to deal with it? Please help. SKU

sku
  • 607
  • 1
  • 8
  • 26
  • HTC fast-boot by design does not broadcast the event. [This question](http://stackoverflow.com/questions/10411731/how-to-get-boot-complete-intent-in-htc-when-i-use-poweroff-for-reboot) or [this one](http://stackoverflow.com/questions/8658862/detect-if-htc-fast-boot-is-enabled) may be helpful. [Duplicate 1](http://stackoverflow.com/questions/9525907/htcs-fast-boot-is-not-broadcasting-boot-completed-intent-nor-wiping-intents-f) [Duplicate 2](http://stackoverflow.com/questions/10411731/how-to-get-boot-complete-intent-in-htc-when-i-use-poweroff-for-reboot) – Esoteric Screen Name Jul 27 '12 at 18:17

2 Answers2

12

In case anyone is programming with an HTC Droid DNA as their target, I discovered that its "fast boot" doesn't send "android.intent.action.QUICKBOOT_POWERON", but rather sends "com.htc.intent.action.QUICKBOOT_POWERON".

I hope this helps someone somewhere as it took me hours to figure this out.

  • 5
    I hate it when OEM just go about changing things without giving damn about the developers. Using "android.intent.action.QUICKBOOT_POWERON" by itself is not a standard way of doing it, now they have changed it again. Thanks for letting me know. – sku Mar 13 '13 at 23:25
  • Is this still useful nowadays to use `android.intent.action.QUICKBOOT_POWERON` ? If not, from which API ? – android developer Aug 17 '20 at 10:01
4

I found the intent action that HTC uses during Fastboot Power On and Power Off. I thought of sharing it here as it may be useful for someone else who is facing same problem as me.

Here is the intent action you need to register in AndroidManifest.xml under your Receiver.

<receiver android:name="com.my.app.MyReceiver">
     <intent-filter>
         <action android:name="android.intent.action.BOOT_COMPLETED"/>
         <action android:name="android.intent.action.QUICKBOOT_POWERON"/>
     </intent-filter>
</receiver>

Hope it was helpful

sku
  • 607
  • 1
  • 8
  • 26
  • Can you please explain me the difference between BOOT_COMPLETED and QUICKBOOT_POWERON? Under what circumstances is QUICKBOOT_POWERON intent sent? – Jaydev Dec 17 '16 at 12:36
  • Is this still useful nowadays to use `android.intent.action.QUICKBOOT_POWERON` ? If not, from which API ? – android developer Aug 17 '20 at 10:00