Share via


DeviceAdminReceiver.OnProfileProvisioningComplete(Context, Intent) Method

Definition

Called when provisioning of a managed profile or managed device has completed successfully.

[Android.Runtime.Register("onProfileProvisioningComplete", "(Landroid/content/Context;Landroid/content/Intent;)V", "GetOnProfileProvisioningComplete_Landroid_content_Context_Landroid_content_Intent_Handler")]
public virtual void OnProfileProvisioningComplete (Android.Content.Context context, Android.Content.Intent intent);
[<Android.Runtime.Register("onProfileProvisioningComplete", "(Landroid/content/Context;Landroid/content/Intent;)V", "GetOnProfileProvisioningComplete_Landroid_content_Context_Landroid_content_Intent_Handler")>]
abstract member OnProfileProvisioningComplete : Android.Content.Context * Android.Content.Intent -> unit
override this.OnProfileProvisioningComplete : 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 when provisioning of a managed profile or managed device has completed successfully.

As a prerequisite for the execution of this callback the DeviceAdminReceiver has to declare an intent filter for #ACTION_PROFILE_PROVISIONING_COMPLETE. Its component must also be specified in the DevicePolicyManager#EXTRA_DEVICE_ADMIN of the DevicePolicyManager#ACTION_PROVISION_MANAGED_PROFILE intent that started the managed provisioning.

When provisioning of a managed profile is complete, the managed profile is hidden until the profile owner calls DevicePolicyManager#setProfileEnabled(ComponentName admin). Typically a profile owner will enable the profile when it has finished any additional setup such as adding an account by using the AccountManager and calling APIs to bring the profile into the desired state.

Note that provisioning completes without waiting for any server interactions, so the profile owner needs to wait for data to be available if required (e.g. Android device IDs or other data that is set as a result of server interactions).

From version android.os.Build.VERSION_CODES#O, when managed provisioning has completed, along with this callback the activity intent DevicePolicyManager#ACTION_PROVISIONING_SUCCESSFUL will also be sent to the same application.

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