TileService.IsLocked Property

Definition

Checks if the lock screen is showing.

public bool IsLocked { [Android.Runtime.Register("isLocked", "()Z", "", ApiSince=24)] get; }
[<get: Android.Runtime.Register("isLocked", "()Z", "", ApiSince=24)>]
member this.IsLocked : bool

Property Value

true if the device is locked.

Attributes

Remarks

Checks if the lock screen is showing.

When a device is locked, then #showDialog will not present a dialog, as it will be under the lock screen. If the behavior of the Tile is safe to do while locked, then the user should use #startActivity to launch an activity on top of the lock screen, otherwise the tile should use #unlockAndRun(Runnable) to give the user their security challenge.

Java documentation for android.service.quicksettings.TileService.isLocked().

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