Context.SendBroadcastWithMultiplePermissions(Intent, String[]) Method

Definition

Broadcast the given intent to all interested BroadcastReceivers, allowing an array of required permissions to be enforced.

[Android.Runtime.Register("sendBroadcastWithMultiplePermissions", "(Landroid/content/Intent;[Ljava/lang/String;)V", "GetSendBroadcastWithMultiplePermissions_Landroid_content_Intent_arrayLjava_lang_String_Handler", ApiSince=30)]
public virtual void SendBroadcastWithMultiplePermissions (Android.Content.Intent intent, string[] receiverPermissions);
[<Android.Runtime.Register("sendBroadcastWithMultiplePermissions", "(Landroid/content/Intent;[Ljava/lang/String;)V", "GetSendBroadcastWithMultiplePermissions_Landroid_content_Intent_arrayLjava_lang_String_Handler", ApiSince=30)>]
abstract member SendBroadcastWithMultiplePermissions : Android.Content.Intent * string[] -> unit
override this.SendBroadcastWithMultiplePermissions : Android.Content.Intent * string[] -> unit

Parameters

intent
Intent

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

receiverPermissions
String[]

Array of names of permissions that a receiver must hold in order to receive your broadcast. If empty, no permissions are required.

Attributes

Remarks

Broadcast the given intent to all interested BroadcastReceivers, allowing an array of required permissions to be enforced. This call is asynchronous; it returns immediately, and you will continue executing while the receivers are run. No results are propagated from receivers and receivers can not abort the broadcast. If you want to allow receivers to propagate results or abort the broadcast, you must send an ordered broadcast using #sendOrderedBroadcast(Intent, String).

See BroadcastReceiver for more information on Intent broadcasts.

Java documentation for android.content.Context.sendBroadcastWithMultiplePermissions(android.content.Intent, java.lang.String[]).

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