Język

PackageManager.GetEnableAppLockIntentForPackage(String, Boolean) Method

Definition

Returns a PendingIntent to launch an Activity that allows the caller to set App Lock for the specified package.

[Android.Runtime.Register("getEnableAppLockIntentForPackage", "(Ljava/lang/String;Z)Landroid/app/PendingIntent;", "GetGetEnableAppLockIntentForPackage_Ljava_lang_String_ZHandler", ApiSince=37)]
[Android.Runtime.RequiresPermission("android.permission.LOCK_APPS")]
public virtual Android.App.PendingIntent? GetEnableAppLockIntentForPackage(string packageName, bool enabled);
[<Android.Runtime.Register("getEnableAppLockIntentForPackage", "(Ljava/lang/String;Z)Landroid/app/PendingIntent;", "GetGetEnableAppLockIntentForPackage_Ljava_lang_String_ZHandler", ApiSince=37)>]
[<Android.Runtime.RequiresPermission("android.permission.LOCK_APPS")>]
abstract member GetEnableAppLockIntentForPackage : string * bool -> Android.App.PendingIntent
override this.GetEnableAppLockIntentForPackage : string * bool -> Android.App.PendingIntent

Parameters

packageName
String

the package to enable or disable App Lock.

enabled
Boolean

true when the user would like to enable App Lock for the given package, false otherwise

Returns

a PendingIntent to launch an activity to set App Lock for the passed in package. If the package does not support App Lock or the package's App Lock state is already in the passed in state, return null.

Attributes

Applies to