Partager via


BroadcastReceiver.InvokeAbortBroadcast Method

Definition

Sets the flag indicating that this receiver should abort the current broadcast; only works with broadcasts sent through Context#sendOrderedBroadcast(Intent, String) Context.sendOrderedBroadcast.

[Android.Runtime.Register("abortBroadcast", "()V", "")]
public void InvokeAbortBroadcast ();
[<Android.Runtime.Register("abortBroadcast", "()V", "")>]
member this.InvokeAbortBroadcast : unit -> unit
Attributes

Remarks

Sets the flag indicating that this receiver should abort the current broadcast; only works with broadcasts sent through Context#sendOrderedBroadcast(Intent, String) Context.sendOrderedBroadcast. This will prevent any other broadcast receivers from receiving the broadcast. It will still call #onReceive of the BroadcastReceiver that the caller of Context#sendOrderedBroadcast(Intent, String) Context.sendOrderedBroadcast passed in.

<strong>This method does not work with non-ordered broadcasts such as those sent with Context#sendBroadcast(Intent) Context.sendBroadcast</strong>

Java documentation for android.content.BroadcastReceiver.abortBroadcast().

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