DevicePolicyManager.StartUserInBackground(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 start the specified secondary user in background.
[Android.Runtime.Register("startUserInBackground", "(Landroid/content/ComponentName;Landroid/os/UserHandle;)I", "GetStartUserInBackground_Landroid_content_ComponentName_Landroid_os_UserHandle_Handler", ApiSince=28)]
public virtual int StartUserInBackground (Android.Content.ComponentName admin, Android.OS.UserHandle userHandle);
[<Android.Runtime.Register("startUserInBackground", "(Landroid/content/ComponentName;Landroid/os/UserHandle;)I", "GetStartUserInBackground_Landroid_content_ComponentName_Landroid_os_UserHandle_Handler", ApiSince=28)>]
abstract member StartUserInBackground : Android.Content.ComponentName * Android.OS.UserHandle -> int
override this.StartUserInBackground : Android.Content.ComponentName * Android.OS.UserHandle -> int
Parameters
- admin
- ComponentName
Which DeviceAdminReceiver
this request is associated with.
- userHandle
- UserHandle
the user to be started in background.
Returns
one of the following result codes:
UserManager#USER_OPERATION_ERROR_UNKNOWN
,
UserManager#USER_OPERATION_SUCCESS
,
UserManager#USER_OPERATION_ERROR_MANAGED_PROFILE
,
UserManager#USER_OPERATION_ERROR_MAX_RUNNING_USERS
,
- Attributes
Remarks
Called by a device owner to start the specified secondary user in background.
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.