Share via


DeviceAdminReceiver.OnDisableRequestedFormatted(Context, Intent) Method

Definition

Called when the user has asked to disable the administrator, as a result of receiving #ACTION_DEVICE_ADMIN_DISABLE_REQUESTED, giving you a chance to present a warning message to them.

[Android.Runtime.Register("onDisableRequested", "(Landroid/content/Context;Landroid/content/Intent;)Ljava/lang/CharSequence;", "GetOnDisableRequested_Landroid_content_Context_Landroid_content_Intent_Handler")]
public virtual Java.Lang.ICharSequence? OnDisableRequestedFormatted (Android.Content.Context context, Android.Content.Intent intent);
[<Android.Runtime.Register("onDisableRequested", "(Landroid/content/Context;Landroid/content/Intent;)Ljava/lang/CharSequence;", "GetOnDisableRequested_Landroid_content_Context_Landroid_content_Intent_Handler")>]
abstract member OnDisableRequestedFormatted : Android.Content.Context * Android.Content.Intent -> Java.Lang.ICharSequence
override this.OnDisableRequestedFormatted : Android.Content.Context * Android.Content.Intent -> Java.Lang.ICharSequence

Parameters

context
Context

The running context as per #onReceive.

intent
Intent

The received intent as per #onReceive.

Returns

Return the warning message to display to the user before being disabled; if null is returned, no message is displayed.

Attributes

Remarks

Called when the user has asked to disable the administrator, as a result of receiving #ACTION_DEVICE_ADMIN_DISABLE_REQUESTED, giving you a chance to present a warning message to them. The message is returned as the result; if null is returned (the default implementation), no message will be displayed.

Java documentation for android.app.admin.DeviceAdminReceiver.onDisableRequested(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