Android.App.Admin.DevicePolicyManager.ResetPassword Method
Force a new device unlock password (the password needed to access the entire device, not for individual accounts) on the user.

Syntax

[Android.Runtime.Register("resetPassword", "(Ljava/lang/String;I)Z", "GetResetPassword_Ljava_lang_String_IHandler")]
public virtual bool ResetPassword (string password, [Android.Runtime.GeneratedEnum] ResetPasswordFlags flags)

Parameters

password
The new password for the user.
flags
May be 0 or DevicePolicyManager.ResetPasswordRequireEntry.

Returns

Documentation for this section has not yet been entered.

Remarks

Force a new device unlock password (the password needed to access the entire device, not for individual accounts) on the user. This takes effect immediately. The given password must be sufficient for the current password quality and length constraints as returned by DevicePolicyManager.GetPasswordQuality(Android.Content.ComponentName) and DevicePolicyManager.GetPasswordMinimumLength(Android.Content.ComponentName); if it does not meet these constraints, then it will be rejected and false returned. Note that the password may be a stronger quality (containing alphanumeric characters when the requested quality is only numeric), in which case the currently active quality will be increased to match.

The calling device admin must have requested DeviceAdminInfo.UsesPolicyResetPassword to be able to call this method; if it has not, a security exception will be thrown.

Calling this from a managed profile will throw a security exception.

[Android Documentation]

Requirements

Namespace: Android.App.Admin
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 8