共用方式為


DeviceAdminReceiver.OnUserSwitched(Context, Intent, UserHandle) 方法

定義

切換至使用者或設定檔時呼叫。

[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

參數

context
Context

根據 #onReceive執行的內容。

intent
Intent

根據接收的意圖 #onReceive

switchedUser
UserHandle

UserHandle剛切換至之使用者的 。

屬性

備註

切換至使用者或設定檔時呼叫。

此回呼僅適用於裝置擁有者。

android.app.admin.DeviceAdminReceiver.onUserSwitched(android.content.Context, android.content.Intent, android.os.UserHandle)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於