Compartilhar via


Intent.ActionLockedBootCompleted Field

Definition

Broadcast Action: This is broadcast once, after the user has finished booting, but while still in the "locked" state.

[Android.Runtime.Register("ACTION_LOCKED_BOOT_COMPLETED", ApiSince=24)]
public const string ActionLockedBootCompleted;
[<Android.Runtime.Register("ACTION_LOCKED_BOOT_COMPLETED", ApiSince=24)>]
val mutable ActionLockedBootCompleted : string

Field Value

Implements

Attributes

Remarks

Broadcast Action: This is broadcast once, after the user has finished booting, but while still in the "locked" state. It can be used to perform application-specific initialization, such as installing alarms. You must hold the android.Manifest.permission#RECEIVE_BOOT_COMPLETED permission in order to receive this broadcast.

This broadcast is sent immediately at boot by all devices (regardless of direct boot support) running android.os.Build.VERSION_CODES#N or higher. Upon receipt of this broadcast, the user is still locked and only device-protected storage can be accessed safely. If you want to access credential-protected storage, you need to wait for the user to be unlocked (typically by entering their lock pattern or PIN for the first time), after which the #ACTION_USER_UNLOCKED and #ACTION_BOOT_COMPLETED broadcasts are sent.

To receive this broadcast, your receiver component must be marked as being ComponentInfo#directBootAware. <p class="note"> This is a protected intent that can only be sent by the system.

Java documentation for android.content.Intent.ACTION_LOCKED_BOOT_COMPLETED.

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