Android.Test.Mock.MockContext.SendOrderedBroadcastAsUser Method
Version of Android.Content.Context.SendOrderedBroadcast(Android.Content.Intent, System.String, System.String, System.String, System.String, System.String, System.String) that allows you to specify the user the broadcast will be sent to.

Syntax

[Android.Runtime.Register("sendOrderedBroadcastAsUser", "(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;Landroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V", "GetSendOrderedBroadcastAsUser_Landroid_content_Intent_Landroid_os_UserHandle_Ljava_lang_String_Landroid_content_BroadcastReceiver_Landroid_os_Handler_ILjava_lang_String_Landroid_os_Bundle_Handler")]
public override void SendOrderedBroadcastAsUser (Android.Content.Intent intent, Android.OS.UserHandle user, string receiverPermission, Android.Content.BroadcastReceiver resultReceiver, Android.OS.Handler scheduler, [Android.Runtime.GeneratedEnum] Android.App.Result initialCode, string initialData, Android.OS.Bundle initialExtras)

Parameters

intent
The Intent to broadcast; all receivers matching this Intent will receive the broadcast.
user
UserHandle to send the intent to.
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 Android.Content.Context.SendOrderedBroadcast(Android.Content.Intent, System.String, System.String, System.String, System.String, System.String, System.String) that allows you to specify the user the broadcast will be sent to. This is not available to applications that are not pre-installed on the system image. Using it requires holding the INTERACT_ACROSS_USERS permission.

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

[Android Documentation]

Requirements

Namespace: Android.Test.Mock
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 17