Difference between Intent.ACTION_REBOOT and Intent.ACTION_SHUTDOWN

Or B picture Or B · Jul 29, 2013 · Viewed 9.8k times · Source

I am trying to receive (with BroadcastReceiver) the action of shutting down, booting and rebooting.

I searched a lot, but I could not figure out what is the difference between Intent.ACTION_REBOOT and Intent.ACTION_SHUTDOWN, and when is Intent.ACTION_REBOOT called (or should I say "broadcasted").

Can please someone explain that for me?

Answer

AAnkit picture AAnkit · Jul 29, 2013

Intent.ACTION_REBOOT is triggered if Reboot/Restart command initiated. This Action only can be used by System code/apps.

Intent.ACTION_SHUTDOWN :- is triggered when SHUTDOWN command is initiated or the device is being shutdown. After this Action is completed device will start shutdown process and any unsaved data will be lost.

You can also read what docs says here >> ACTION_REBOOT and ACTION_SHUTDOWN