MediaSession.SetMediaButtonReceiver(PendingIntent) 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.
Set a pending intent for your media button receiver to allow restarting playback after the session has been stopped.
[Android.Runtime.Register("setMediaButtonReceiver", "(Landroid/app/PendingIntent;)V", "")]
public void SetMediaButtonReceiver (Android.App.PendingIntent? mbr);
[<Android.Runtime.Register("setMediaButtonReceiver", "(Landroid/app/PendingIntent;)V", "")>]
member this.SetMediaButtonReceiver : Android.App.PendingIntent -> unit
Parameters
- mbr
- PendingIntent
The PendingIntent
to send the media button event to.
- Attributes
Remarks
Set a pending intent for your media button receiver to allow restarting playback after the session has been stopped. If your app is started in this way an Intent#ACTION_MEDIA_BUTTON
intent will be sent via the pending intent.
The pending intent is recommended to be explicit to follow the security recommendation of PendingIntent#getActivity
.
This member is deprecated. Use #setMediaButtonBroadcastReceiver(ComponentName)
instead.
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.