Udostępnij za pośrednictwem


DeviceAdminReceiver.OnPasswordExpiring Method

Definition

Overloads

OnPasswordExpiring(Context, Intent)

Called periodically when the device or profile challenge password is about to expire or has expired.

OnPasswordExpiring(Context, Intent, UserHandle)

Called periodically when the device or profile challenge password is about to expire or has expired.

OnPasswordExpiring(Context, Intent)

Called periodically when the device or profile challenge password is about to expire or has expired.

[Android.Runtime.Register("onPasswordExpiring", "(Landroid/content/Context;Landroid/content/Intent;)V", "GetOnPasswordExpiring_Landroid_content_Context_Landroid_content_Intent_Handler")]
public virtual void OnPasswordExpiring (Android.Content.Context context, Android.Content.Intent intent);
[<Android.Runtime.Register("onPasswordExpiring", "(Landroid/content/Context;Landroid/content/Intent;)V", "GetOnPasswordExpiring_Landroid_content_Context_Landroid_content_Intent_Handler")>]
abstract member OnPasswordExpiring : Android.Content.Context * Android.Content.Intent -> unit
override this.OnPasswordExpiring : Android.Content.Context * Android.Content.Intent -> unit

Parameters

context
Context

The running context as per #onReceive.

intent
Intent

The received intent as per #onReceive.

Attributes

Remarks

Called periodically when the device or profile challenge password is about to expire or has expired. It will typically be called at these times: on device boot, once per day before the password expires, and at the time when the password expires.

If the password is not updated by the user, this method will continue to be called once per day until the password is changed or the device admin disables password expiration.

The admin will typically post a notification requesting the user to change their password in response to this call. The actual password expiration time can be obtained by calling DevicePolicyManager#getPasswordExpiration(ComponentName)

The admin should be sure to take down any notifications it posted in response to this call when it receives DeviceAdminReceiver#onPasswordChanged(Context, Intent) .

This member is deprecated. From android.os.Build.VERSION_CODES#O, use #onPasswordExpiring(Context, Intent, UserHandle) instead.

Java documentation for android.app.admin.DeviceAdminReceiver.onPasswordExpiring(android.content.Context, android.content.Intent).

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

OnPasswordExpiring(Context, Intent, UserHandle)

Called periodically when the device or profile challenge password is about to expire or has expired.

[Android.Runtime.Register("onPasswordExpiring", "(Landroid/content/Context;Landroid/content/Intent;Landroid/os/UserHandle;)V", "GetOnPasswordExpiring_Landroid_content_Context_Landroid_content_Intent_Landroid_os_UserHandle_Handler", ApiSince=26)]
public virtual void OnPasswordExpiring (Android.Content.Context context, Android.Content.Intent intent, Android.OS.UserHandle user);
[<Android.Runtime.Register("onPasswordExpiring", "(Landroid/content/Context;Landroid/content/Intent;Landroid/os/UserHandle;)V", "GetOnPasswordExpiring_Landroid_content_Context_Landroid_content_Intent_Landroid_os_UserHandle_Handler", ApiSince=26)>]
abstract member OnPasswordExpiring : Android.Content.Context * Android.Content.Intent * Android.OS.UserHandle -> unit
override this.OnPasswordExpiring : Android.Content.Context * Android.Content.Intent * Android.OS.UserHandle -> unit

Parameters

context
Context

The running context as per #onReceive.

intent
Intent

The received intent as per #onReceive.

user
UserHandle

The user or profile for whom the password is expiring. To see whether this user is the current profile or a parent user, check for equality with Process#myUserHandle.

Attributes

Remarks

Called periodically when the device or profile challenge password is about to expire or has expired. It will typically be called at these times: on device boot, once per day before the password expires, and at the time when the password expires.

If the password is not updated by the user, this method will continue to be called once per day until the password is changed or the device admin disables password expiration.

The admin will typically post a notification requesting the user to change their password in response to this call. The actual password expiration time can be obtained by calling DevicePolicyManager#getPasswordExpiration(ComponentName)

The admin should be sure to take down any notifications it posted in response to this call when it receives DeviceAdminReceiver#onPasswordChanged(Context, Intent, UserHandle) .

Java documentation for android.app.admin.DeviceAdminReceiver.onPasswordExpiring(android.content.Context, android.content.Intent, android.os.UserHandle).

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