Share via


DevicePolicyManager.ActionSetNewPassword Field

Definition

Activity action: have the user enter a new password.

[Android.Runtime.Register("ACTION_SET_NEW_PASSWORD")]
public const string ActionSetNewPassword;
[<Android.Runtime.Register("ACTION_SET_NEW_PASSWORD")>]
val mutable ActionSetNewPassword : string

Field Value

Attributes

Remarks

Activity action: have the user enter a new password.

For admin apps, this activity should be launched after using #setPasswordQuality(ComponentName, int), or #setPasswordMinimumLength(ComponentName, int) to have the user enter a new password that meets the current requirements. You can use #isActivePasswordSufficient() to determine whether you need to have the user select a new password in order to meet the current constraints. Upon being resumed from this activity, you can check the new password characteristics to see if they are sufficient.

Non-admin apps can use #getPasswordComplexity() to check the current screen lock complexity, and use this activity with extra #EXTRA_PASSWORD_COMPLEXITY to suggest to users how complex the app wants the new screen lock to be. Note that both #getPasswordComplexity() and the extra #EXTRA_PASSWORD_COMPLEXITY require the calling app to have the permission permission#REQUEST_PASSWORD_COMPLEXITY.

If the intent is launched from within a managed profile with a profile owner built against android.os.Build.VERSION_CODES#M or before, this will trigger entering a new password for the parent of the profile. For all other cases it will trigger entering a new password for the user or profile it is launched from.

Java documentation for android.app.admin.DevicePolicyManager.ACTION_SET_NEW_PASSWORD.

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