Enables the admin policy. The user will be shown a dialog with the requested features. This method can only be called from an Activity context. Explanation - A message shown at the top of the dialog.
EnabledAsBoolean [read only]
Returns true if the admin policy is active.
LockScreen
Immediately locks the screen. Requires the force-lock tag in the policies file.
MaximumTimeToLockAsLong [write only]
Sets the maximum time (measured in milliseconds) before the device locks. This limits the length that the user can set in the settings screen. Requires the force-lock tag in the policies file.
PASSWORD_QUALITY_ALPHABETICAsInt
PASSWORD_QUALITY_ALPHANUMERICAsInt
PASSWORD_QUALITY_NUMERICAsInt
PASSWORD_QUALITY_UNSPECIFIEDAsInt
PasswordSufficientAsBoolean [read only]
Tests whether the current password meets the requirements. Requires the limit-password tag in the policies file.
RequestNewPassword
Shows the new password activity. Note that the user might cancel the change.
ResetPassword (NewPasswordAsString) AsBoolean
Sets the given password as the device password. Requires the reset-password tag in the policies file.
Sets the minimum allowed length and quality for device passwords. These settings will affect new passwords. Requires the limit-password tag in the policies file.
QualityFlag - One of the password quality flags. MinimumLength - Password minimum length.