Partager via


ContextWrapper.SendBroadcastAsUser Method

Definition

Overloads

SendBroadcastAsUser(Intent, UserHandle, String)

Version of SendBroadcast(Intent, String) that allows you to specify the user the broadcast will be sent to.

SendBroadcastAsUser(Intent, UserHandle)

Version of SendBroadcast(Intent) that allows you to specify the user the broadcast will be sent to.

SendBroadcastAsUser(Intent, UserHandle, String)

Version of SendBroadcast(Intent, String) that allows you to specify the user the broadcast will be sent to.

[Android.Runtime.Register("sendBroadcastAsUser", "(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;)V", "GetSendBroadcastAsUser_Landroid_content_Intent_Landroid_os_UserHandle_Ljava_lang_String_Handler")]
public override void SendBroadcastAsUser (Android.Content.Intent? intent, Android.OS.UserHandle? user, string? receiverPermission);
[<Android.Runtime.Register("sendBroadcastAsUser", "(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;)V", "GetSendBroadcastAsUser_Landroid_content_Intent_Landroid_os_UserHandle_Ljava_lang_String_Handler")>]
override this.SendBroadcastAsUser : Android.Content.Intent * Android.OS.UserHandle * string -> unit

Parameters

intent
Intent

The Intent to broadcast; all receivers matching this Intent will receive the broadcast.

user
UserHandle

UserHandle to send the intent to.

receiverPermission
String

(optional) String naming a permission that a receiver must hold in order to receive your broadcast. If null, no permission is required.

Attributes

Remarks

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

SendBroadcastAsUser(Intent, UserHandle)

Version of SendBroadcast(Intent) that allows you to specify the user the broadcast will be sent to.

[Android.Runtime.Register("sendBroadcastAsUser", "(Landroid/content/Intent;Landroid/os/UserHandle;)V", "GetSendBroadcastAsUser_Landroid_content_Intent_Landroid_os_UserHandle_Handler")]
public override void SendBroadcastAsUser (Android.Content.Intent? intent, Android.OS.UserHandle? user);
[<Android.Runtime.Register("sendBroadcastAsUser", "(Landroid/content/Intent;Landroid/os/UserHandle;)V", "GetSendBroadcastAsUser_Landroid_content_Intent_Landroid_os_UserHandle_Handler")>]
override this.SendBroadcastAsUser : Android.Content.Intent * Android.OS.UserHandle -> unit

Parameters

intent
Intent

The intent to broadcast

user
UserHandle

UserHandle to send the intent to.

Attributes

Remarks

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