다음을 통해 공유


MockContext.SendBroadcast Method

Definition

Overloads

SendBroadcast(Intent)

Broadcast the given intent to all interested BroadcastReceivers.

SendBroadcast(Intent, String)

Broadcast the given intent to all interested BroadcastReceivers, allowing an optional required permission to be enforced.

SendBroadcast(Intent)

Broadcast the given intent to all interested BroadcastReceivers.

[Android.Runtime.Register("sendBroadcast", "(Landroid/content/Intent;)V", "GetSendBroadcast_Landroid_content_Intent_Handler")]
public override void SendBroadcast (Android.Content.Intent? intent);
[<Android.Runtime.Register("sendBroadcast", "(Landroid/content/Intent;)V", "GetSendBroadcast_Landroid_content_Intent_Handler")>]
override this.SendBroadcast : Android.Content.Intent -> unit

Parameters

intent
Intent

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

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

SendBroadcast(Intent, String)

Broadcast the given intent to all interested BroadcastReceivers, allowing an optional required permission to be enforced.

[Android.Runtime.Register("sendBroadcast", "(Landroid/content/Intent;Ljava/lang/String;)V", "GetSendBroadcast_Landroid_content_Intent_Ljava_lang_String_Handler")]
public override void SendBroadcast (Android.Content.Intent? intent, string? receiverPermission);
[<Android.Runtime.Register("sendBroadcast", "(Landroid/content/Intent;Ljava/lang/String;)V", "GetSendBroadcast_Landroid_content_Intent_Ljava_lang_String_Handler")>]
override this.SendBroadcast : Android.Content.Intent * string -> unit

Parameters

intent
Intent

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

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