Language

KeyguardManager.NewKeyguardLock(String) Method

Definition

Caution

deprecated

This method was deprecated in API level 15.

[Android.Runtime.Register("newKeyguardLock", "(Ljava/lang/String;)Landroid/app/KeyguardManager$KeyguardLock;", "GetNewKeyguardLock_Ljava_lang_String_Handler")]
[System.Obsolete("deprecated")]
public virtual Android.App.KeyguardManager.KeyguardLock? NewKeyguardLock(string? tag);
[<Android.Runtime.Register("newKeyguardLock", "(Ljava/lang/String;)Landroid/app/KeyguardManager$KeyguardLock;", "GetNewKeyguardLock_Ljava_lang_String_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member NewKeyguardLock : string -> Android.App.KeyguardManager.KeyguardLock
override this.NewKeyguardLock : string -> Android.App.KeyguardManager.KeyguardLock

Parameters

tag
String

String: A tag that informally identifies who you are (for debugging who is disabling the keyguard).

Returns

A KeyguardLock handle to use to disable and reenable the keyguard.

Attributes

Remarks

This method was deprecated in API level 15. Use R.attr.showWhenLocked or Activity.setShowWhenLocked(boolean) instead. This allows you to seamlessly occlude and unocclude the keyguard as your application moves in and out of the foreground and does not require that any special permissions be requested.

Enables you to temporarily disable / reenable the keyguard (lock screen).

Android reference for android.app.KeyguardManager.newKeyguardLock.

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