Android.App.Admin.DeviceAdminReceiver.OnEnabled Method
Called after the administrator is first enabled, as a result of receiving DeviceAdminReceiver.ActionDeviceAdminEnabled.

Syntax

[Android.Runtime.Register("onEnabled", "(Landroid/content/Context;Landroid/content/Intent;)V", "GetOnEnabled_Landroid_content_Context_Landroid_content_Intent_Handler")]
public virtual void OnEnabled (Android.Content.Context context, Android.Content.Intent intent)

Parameters

context
The running context as per DeviceAdminReceiver.OnReceive(Android.Content.Context, Android.Content.Intent).
intent
The received intent as per DeviceAdminReceiver.OnReceive(Android.Content.Context, Android.Content.Intent).

Remarks

Called after the administrator is first enabled, as a result of receiving DeviceAdminReceiver.ActionDeviceAdminEnabled. At this point you can use Android.App.Admin.DevicePolicyManager to set your desired policies.

If the admin is activated by a device owner, then the intent may contain private extras that are relevant to user setup.

[Android Documentation]

Requirements

Namespace: Android.App.Admin
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 8