Language

MediaController2.ControllerCallback.OnSessionCommand Method

Definition

Called when the connected session sent a session command.

[Android.Runtime.Register("onSessionCommand", "(Landroid/media/MediaController2;Landroid/media/Session2Command;Landroid/os/Bundle;)Landroid/media/Session2Command$Result;", "GetOnSessionCommand_Landroid_media_MediaController2_Landroid_media_Session2Command_Landroid_os_Bundle_Handler", ApiSince=29)]
public virtual Android.Media.Session2Command.Result? OnSessionCommand(Android.Media.MediaController2 controller, Android.Media.Session2Command command, Android.OS.Bundle? args);
[<Android.Runtime.Register("onSessionCommand", "(Landroid/media/MediaController2;Landroid/media/Session2Command;Landroid/os/Bundle;)Landroid/media/Session2Command$Result;", "GetOnSessionCommand_Landroid_media_MediaController2_Landroid_media_Session2Command_Landroid_os_Bundle_Handler", ApiSince=29)>]
abstract member OnSessionCommand : Android.Media.MediaController2 * Android.Media.Session2Command * Android.OS.Bundle -> Android.Media.Session2Command.Result
override this.OnSessionCommand : Android.Media.MediaController2 * Android.Media.Session2Command * Android.OS.Bundle -> Android.Media.Session2Command.Result

Parameters

controller
MediaController2

the controller for this event. This value cannot be null.

command
Session2Command

the session command. This value cannot be null.

args
Bundle

optional arguments. This value may be null.

Returns

the result for the session command. If null, RESULT_INFO_SKIPPED will be sent to the session.

Attributes

Remarks

Called when the connected session sent a session command.

Android reference for android.media.MediaController2.ControllerCallback.onSessionCommand.

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