Android.Content.Context.SendOrderedBroadcast Method
Version of Context.SendBroadcast(Intent) that allows you to receive data back from the broadcast.

Syntax

[Android.Runtime.Register("sendOrderedBroadcast", "(Landroid/content/Intent;Ljava/lang/String;Landroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V", "GetSendOrderedBroadcast_Landroid_content_Intent_Ljava_lang_String_Landroid_content_BroadcastReceiver_Landroid_os_Handler_ILjava_lang_String_Landroid_os_Bundle_Handler")]
public abstract void SendOrderedBroadcast (Intent intent, string receiverPermission, BroadcastReceiver resultReceiver, Android.OS.Handler scheduler, [Android.Runtime.GeneratedEnum] Android.App.Result initialCode, string initialData, Android.OS.Bundle initialExtras)

See Also

Context.SendBroadcast(Intent)
Context.SendBroadcast(Intent, System.String)
Context.SendOrderedBroadcast(Intent, System.String)
BroadcastReceiver
Context.RegisterReceiver(BroadcastReceiver, Android.Content.IntentFilter)

Parameters

intent
The Intent to broadcast; all receivers matching this Intent will receive the broadcast.
receiverPermission
String naming a permissions that a receiver must hold in order to receive your broadcast. If null, no permission is required.
resultReceiver
Your own BroadcastReceiver to treat as the final receiver of the broadcast.
scheduler
A custom Handler with which to schedule the resultReceiver callback; if null it will be scheduled in the Context's main thread.
initialCode
An initial value for the result code. Often Activity.RESULT_OK.
initialData
An initial value for the result data. Often null.
initialExtras
An initial value for the result extras. Often null.

Remarks

Version of Context.SendBroadcast(Intent) that allows you to receive data back from the broadcast. This is accomplished by supplying your own BroadcastReceiver when calling, which will be treated as a final receiver at the end of the broadcast -- its BroadcastReceiver.OnReceive(Context, Android.Content.Intent) method will be called with the result values collected from the other receivers. The broadcast will be serialized in the same way as calling Context.SendOrderedBroadcast(Intent, System.String).

Like Context.SendBroadcast(Intent), this method is asynchronous; it will return before resultReceiver.onReceive() is called.

See Android.Content.BroadcastReceiver for more information on Intent broadcasts.

[Android Documentation]

Requirements

Namespace: Android.Content
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1