Share via


DevicePolicyManager.RemoveUser(ComponentName, UserHandle) Method

Definition

Called by a device owner to remove a user/profile and all associated data.

[Android.Runtime.Register("removeUser", "(Landroid/content/ComponentName;Landroid/os/UserHandle;)Z", "GetRemoveUser_Landroid_content_ComponentName_Landroid_os_UserHandle_Handler")]
public virtual bool RemoveUser (Android.Content.ComponentName admin, Android.OS.UserHandle userHandle);
[<Android.Runtime.Register("removeUser", "(Landroid/content/ComponentName;Landroid/os/UserHandle;)Z", "GetRemoveUser_Landroid_content_ComponentName_Landroid_os_UserHandle_Handler")>]
abstract member RemoveUser : Android.Content.ComponentName * Android.OS.UserHandle -> bool
override this.RemoveUser : Android.Content.ComponentName * Android.OS.UserHandle -> bool

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with.

userHandle
UserHandle

the user to remove.

Returns

true if the user was removed, false otherwise.

Attributes

Remarks

Called by a device owner to remove a user/profile and all associated data. The primary user can not be removed.

Java documentation for android.app.admin.DevicePolicyManager.removeUser(android.content.ComponentName, 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