Android.Media.AudioManager.RegisterMediaButtonEventReceiver Method
Register a component to be the sole receiver of MEDIA_BUTTON intents.

Syntax

[Android.Runtime.Register("registerMediaButtonEventReceiver", "(Landroid/app/PendingIntent;)V", "GetRegisterMediaButtonEventReceiver_Landroid_app_PendingIntent_Handler")]
[System.Obsolete("deprecated")]
public virtual void RegisterMediaButtonEventReceiver (Android.App.PendingIntent eventReceiver)

Parameters

eventReceiver
target that will receive media button intents. The PendingIntent will be sent an Android.Content.Intent.ActionMediaButton event when a media button action occurs, with Android.Content.Intent.ExtraKeyEvent added and holding the key code of the media button that was pressed.

Remarks

Register a component to be the sole receiver of MEDIA_BUTTON intents. This is like AudioManager.RegisterMediaButtonEventReceiver(Android.Content.ComponentName), but allows the buttons to go to any PendingIntent. Note that you should only use this form if you know you will continue running for the full time until unregistering the PendingIntent.

[Android Documentation]

Requirements

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