MediaController.DispatchMediaButtonEvent(KeyEvent) Method

Definition

Send the specified media button event to the session.

[Android.Runtime.Register("dispatchMediaButtonEvent", "(Landroid/view/KeyEvent;)Z", "")]
public bool DispatchMediaButtonEvent (Android.Views.KeyEvent keyEvent);
[<Android.Runtime.Register("dispatchMediaButtonEvent", "(Landroid/view/KeyEvent;)Z", "")>]
member this.DispatchMediaButtonEvent : Android.Views.KeyEvent -> bool

Parameters

keyEvent
KeyEvent

The media button event to dispatch.

Returns

true if the event was sent to the session, false otherwise.

Attributes

Remarks

Send the specified media button event to the session. Only media keys can be sent by this method, other keys will be ignored.

Java documentation for android.media.session.MediaController.dispatchMediaButtonEvent(android.view.KeyEvent).

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.

Applies to