Context.SendBroadcastAsUser Context.SendBroadcastAsUser Method

Definition

Overloads

SendBroadcastAsUser(Intent, UserHandle) SendBroadcastAsUser(Intent, UserHandle)

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

SendBroadcastAsUser(Intent, UserHandle, String) 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) 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", ApiSince=17)]
[Android.Runtime.RequiresPermission("android.permission.INTERACT_ACROSS_USERS")]
public abstract void SendBroadcastAsUser (Android.Content.Intent intent, Android.OS.UserHandle user);
abstract member SendBroadcastAsUser : Android.Content.Intent * Android.OS.UserHandle -> unit

Parameters

intent
Intent Intent

The intent to broadcast

user
UserHandle UserHandle

UserHandle to send the intent to.

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.

See also

SendBroadcastAsUser(Intent, UserHandle, String) 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", ApiSince=17)]
[Android.Runtime.RequiresPermission("android.permission.INTERACT_ACROSS_USERS")]
public abstract void SendBroadcastAsUser (Android.Content.Intent intent, Android.OS.UserHandle user, string receiverPermission);
abstract member SendBroadcastAsUser : Android.Content.Intent * Android.OS.UserHandle * string -> unit

Parameters

intent
Intent Intent

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

user
UserHandle UserHandle

UserHandle to send the intent to.

receiverPermission
String String

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

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