简体   繁体   中英

Android: What is different between Intent Action Reboot and RebootCompleted

I saw these two different actions. I mostly used RebootCompleted which the system reboot completed but there is a delay before these action was sent to the receiver. Does the Reboot will be sent inbetween the phone gets started and rebootCompleted?

There's no Reboot Completed intent. You most likely mean android.intent.action.BOOT_COMPLETED . This is action broadcasted by system to listening apps, once the system completed booting, which allows ie Calendar app to re-set alarms etc.

Intent.ACTION_REBOOT from other hand is a broadcast to have the system rebooted. But user apps cannot send it normally, yet if you'd be privileged app, then as result system should reboot.

So despite name similarities, these are completely different things. However once Intent.ACTION_REBOOT is fired successfully and device completed reboot, android.intent.action.BOOT_COMPLETED will be broadcasted

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM