ACTION_SCREEN_OFF constant

String const ACTION_SCREEN_OFF

Broadcast Action: Sent when the device goes to sleep and becomes non-interactive.

For historical reasons, the name of this broadcast action refers to the power state of the screen but it is actually sent in response to changes in the overall interactive state of the device.

This broadcast is sent when the device becomes non-interactive which may have nothing to do with the screen turning off. To determine the actual state of the screen, use {@link android.view.Display#getState}.

See {@link android.os.PowerManager#isInteractive} for details.

You cannot receive this through components declared in manifests, only by explicitly registering for it with {@link Context#registerReceiver(BroadcastReceiver, IntentFilter) Context.registerReceiver()}.

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

Implementation

static const String ACTION_SCREEN_OFF = "android.intent.action.SCREEN_OFF";