Sdílet prostřednictvím


MediaSession.Callback.OnCommand(String, Bundle, ResultReceiver) Method

Definition

Called when a controller has sent a command to this session.

[Android.Runtime.Register("onCommand", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/os/ResultReceiver;)V", "GetOnCommand_Ljava_lang_String_Landroid_os_Bundle_Landroid_os_ResultReceiver_Handler")]
public virtual void OnCommand (string command, Android.OS.Bundle? args, Android.OS.ResultReceiver? cb);
[<Android.Runtime.Register("onCommand", "(Ljava/lang/String;Landroid/os/Bundle;Landroid/os/ResultReceiver;)V", "GetOnCommand_Ljava_lang_String_Landroid_os_Bundle_Landroid_os_ResultReceiver_Handler")>]
abstract member OnCommand : string * Android.OS.Bundle * Android.OS.ResultReceiver -> unit
override this.OnCommand : string * Android.OS.Bundle * Android.OS.ResultReceiver -> unit

Parameters

command
String

The command name.

args
Bundle

Optional parameters for the command, may be null.

cb
ResultReceiver

A result receiver to which a result may be sent by the command, may be null.

Attributes

Remarks

Called when a controller has sent a command to this session. The owner of the session may handle custom commands but is not required to.

Java documentation for android.media.session.MediaSession.Callback.onCommand(java.lang.String, android.os.Bundle, android.os.ResultReceiver).

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