共用方式為


Intent.ActionBootCompleted Field

Definition

Broadcast Action: This is broadcast once, after the user has finished booting.

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

Field Value

Implements

Attributes

Remarks

Broadcast Action: This is broadcast once, after the user has finished booting. 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 at boot by all devices (both with and without direct boot support). Upon receipt of this broadcast, the user is unlocked and both device-protected and credential-protected storage can accessed safely.

If you need to run while the user is still locked (before they've entered their lock pattern or PIN for the first time), you can listen for the #ACTION_LOCKED_BOOT_COMPLETED broadcast. <p class="note"> This is a protected intent that can only be sent by the system.

Java documentation for android.content.Intent.ACTION_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