Share via


AccessoryManager.IsPhonePinLocked Property

Definition

Gets a value indicating whether the phone is locked.

public:
 static property bool IsPhonePinLocked { bool get(); };
static bool IsPhonePinLocked();
public static bool IsPhonePinLocked { get; }
var boolean = AccessoryManager.isPhonePinLocked;
Public Shared ReadOnly Property IsPhonePinLocked As Boolean

Property Value

Boolean

bool

True if phone is locked, otherwise false.

Windows requirements

App capabilities
accessoryManager

Remarks

Important

When the phone is pin locked, email notifications may come in with no information due to Data Protection Under pin Lock (DPUL). This feature is enabled by the end-user.

It may be useful for an accessory to know that the phone is currently locked. The associated background task can then choose whether or not to take certain actions if the phone is locked. This will be most useful with active cover apps where certain UI should not be shown if the phone is locked.

Calling this API requires that the ID_CAP_SMS and ID_CAP_SMS_COMPANION capabilities be specified in the application manifest.

Applies to