DevicePolicyManager.RemoveUser(ComponentName, UserHandle) 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 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.
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.