Difference between BOOT_COMPLETED and QUICKBOOT_POWERON on Android
Asked Answered
H

2

37

I have created BroadcastReceiver to schedule my Service execution every 30 seconds. This is what I have in AndroidManifest.xml :

<receiver android:name="MyScheduleReceiver" >
     <intent-filter>
          <action android:name="android.intent.action.BOOT_COMPLETED" />
          <action android:name="android.intent.action.QUICKBOOT_POWERON" />
     </intent-filter>
</receiver>

This is working great now, but only after I added QUICKBOOT_POWERON action. Before that I had only BOOT_COMPLETED and when I reboot emulator or phone while debugging, my service would never start. So my question is what is the difference between these two and when to use each?

Hammered answered 3/1, 2015 at 10:33 Comment(3)
check this https://mcmap.net/q/426890/-boot-receiver-not-workingHampshire
That's exactly where I found working solution - but my phone is not HTC and it still wasn't working without QUICKBOOT_POWERON. That's the reason why I opened new question in order to get more general answer.Hammered
com.htc.intent.action.QUICKBOOT_POWERON (and not android.intent.action...) #11693423Borges
B
29

Intent android.intent.action.BOOT_COMPLETED is received after a "cold" boot.

Intent android.intent.action.QUICKBOOT_POWERON is received after a "restart" or a "reboot".

Check here

Bimestrial answered 12/1, 2018 at 21:15 Comment(4)
I restarted my phone (Lenovo P2) an received a Boot_completed intent... didn't check the other one though.Demibastion
I think it's applicable only for Google emulator. Real devices always do "cold" bootGareth
Is this still useful nowadays to use android.intent.action.QUICKBOOT_POWERON ? If not, from which API ?Mortify
But that permission is not anywhere! Where actually did people heard of this permissio? Should it even be used if Android Studio doesn't find it?? I have internal/hidden APIs showing and it still doesn't exist, it seems.Monumental
D
0

This is only required on HTC devices to support their "quickboot" feature

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

Here is the full code from official code https://android.googlesource.com/platform/packages/apps/StorageManager/+/refs/tags/android-7.1.2_r8/AndroidManifest.xml

<receiver android:name=".automatic.AutomaticStorageBroadcastReceiver"
                      android:enabled="@bool/enable_automatic_storage_management">
                <intent-filter>
                    <action android:name="android.intent.action.BOOT_COMPLETED" />
                    <!-- This is required on HTC devices to support their "quickboot" feature -->
                    <action android:name="android.intent.action.QUICKBOOT_POWERON" />
                </intent-filter>
            </receiver>
enter code here
Drama answered 30/3 at 4:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.