DeviceAdminReceiver.OnDisableRequested(Context, Intent) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
public string? OnDisableRequested (Android.Content.Context context, Android.Content.Intent intent);
member this.OnDisableRequested : Android.Content.Context * Android.Content.Intent -> string
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.
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.
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.