Compartilhar via


Intent.ActionScreenOff Field

Definition

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

[Android.Runtime.Register("ACTION_SCREEN_OFF")]
public const string ActionScreenOff;
[<Android.Runtime.Register("ACTION_SCREEN_OFF")>]
val mutable ActionScreenOff : string

Field Value

Implements

Attributes

Remarks

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 android.view.Display#getState.

See android.os.PowerManager#isInteractive for details.

You <em>cannot</em> receive this through components declared in manifests, only by explicitly registering for it with Context#registerReceiver(BroadcastReceiver, IntentFilter) Context.registerReceiver().

<p class="note">This is a protected intent that can only be sent by the system.

Java documentation for android.content.Intent.ACTION_SCREEN_OFF.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to