DeviceAdminReceiver.OnUserSwitched(Context, Intent, 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 when a user or profile is switched to.
[Android.Runtime.Register("onUserSwitched", "(Landroid/content/Context;Landroid/content/Intent;Landroid/os/UserHandle;)V", "GetOnUserSwitched_Landroid_content_Context_Landroid_content_Intent_Landroid_os_UserHandle_Handler", ApiSince=28)]
public virtual void OnUserSwitched (Android.Content.Context context, Android.Content.Intent intent, Android.OS.UserHandle switchedUser);
[<Android.Runtime.Register("onUserSwitched", "(Landroid/content/Context;Landroid/content/Intent;Landroid/os/UserHandle;)V", "GetOnUserSwitched_Landroid_content_Context_Landroid_content_Intent_Landroid_os_UserHandle_Handler", ApiSince=28)>]
abstract member OnUserSwitched : Android.Content.Context * Android.Content.Intent * Android.OS.UserHandle -> unit
override this.OnUserSwitched : Android.Content.Context * Android.Content.Intent * Android.OS.UserHandle -> unit
Parameters
- context
- Context
The running context as per #onReceive
.
- intent
- Intent
The received intent as per #onReceive
.
- switchedUser
- UserHandle
The UserHandle
of the user that has just been switched to.
- Attributes
Remarks
Called when a user or profile is switched to.
This callback is only applicable to device owners.
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.