Android.Test.Mock.MockContext.SendStickyBroadcast Method

Syntax

[Android.Runtime.Register("sendStickyBroadcast", "(Landroid/content/Intent;)V", "GetSendStickyBroadcast_Landroid_content_Intent_Handler")]
[System.Obsolete("deprecated")]
public override void SendStickyBroadcast (Android.Content.Intent intent)

Parameters

intent
The Intent to broadcast; all receivers matching this Intent will receive the broadcast, and the Intent will be held to be re-broadcast to future receivers.

Remarks

Perform a Android.Content.Context.SendBroadcast(Android.Content.Intent) that is "sticky," meaning the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of Android.Content.Context.RegisterReceiver(Android.Content.BroadcastReceiver, Android.Content.IntentFilter). In all other ways, this behaves the same as Android.Content.Context.SendBroadcast(Android.Content.Intent).

You must hold the NoType:android/Manifest$permission;Href=../../../../reference/android/Manifest.permission.html#BROADCAST_STICKY permission in order to use this API. If you do not hold that permission, Java.Lang.SecurityException will be thrown.

[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 1