ACTION_SHUTDOWN constant

String const ACTION_SHUTDOWN

Broadcast Action: Device is shutting down. This is broadcast when the device is being shut down (completely turned off, not sleeping). Once the broadcast is complete, the const shutdown will proceed and all unsaved data lost. Apps will not normally need to handle this, since the foreground activity will be paused as well.

As of {@link Build.VERSION_CODES#P} this broadcast is only sent to receivers registered through {@link Context#registerReceiver(BroadcastReceiver, IntentFilter) Context.registerReceiver}.

This is a protected intent that can only be sent by the system.

May include the following extras:

  • {@link #EXTRA_SHUTDOWN_USERSPACE_ONLY} a boolean that is set to true if this shutdown is only for userspace processes. If not set, assumed to be false.

Implementation

static const String ACTION_SHUTDOWN = "android.intent.action.ACTION_SHUTDOWN";