Context.SendStickyBroadcastAsUser(Intent, UserHandle) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Caution
deprecated
Version of #sendStickyBroadcast(Intent)
that allows you to specify the
user the broadcast will be sent to.
[Android.Runtime.Register("sendStickyBroadcastAsUser", "(Landroid/content/Intent;Landroid/os/UserHandle;)V", "GetSendStickyBroadcastAsUser_Landroid_content_Intent_Landroid_os_UserHandle_Handler")]
[System.Obsolete("deprecated")]
public abstract void SendStickyBroadcastAsUser (Android.Content.Intent? intent, Android.OS.UserHandle? user);
[<Android.Runtime.Register("sendStickyBroadcastAsUser", "(Landroid/content/Intent;Landroid/os/UserHandle;)V", "GetSendStickyBroadcastAsUser_Landroid_content_Intent_Landroid_os_UserHandle_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member SendStickyBroadcastAsUser : Android.Content.Intent * Android.OS.UserHandle -> unit
Parameters
- intent
- 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.
- user
- UserHandle
UserHandle to send the intent to.
- Attributes
Remarks
Version of #sendStickyBroadcast(Intent)
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.
This member is deprecated. Sticky broadcasts should not be used. They provide no security (anyone can access them), no protection (anyone can modify them), and many other problems. The recommended pattern is to use a non-sticky broadcast to report that <em>something</em> has changed, with another mechanism for apps to retrieve the current value whenever desired.
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.