共用方式為


MediaController.TransportControls.SendCustomAction Method

Definition

Overloads

SendCustomAction(PlaybackState+CustomAction, Bundle)
SendCustomAction(String, Bundle)

Send the id and args from a custom action back for the MediaSession to perform.

SendCustomAction(PlaybackState+CustomAction, Bundle)

[Android.Runtime.Register("sendCustomAction", "(Landroid/media/session/PlaybackState$CustomAction;Landroid/os/Bundle;)V", "")]
public void SendCustomAction (Android.Media.Session.PlaybackState.CustomAction customAction, Android.OS.Bundle? args);
[<Android.Runtime.Register("sendCustomAction", "(Landroid/media/session/PlaybackState$CustomAction;Landroid/os/Bundle;)V", "")>]
member this.SendCustomAction : Android.Media.Session.PlaybackState.CustomAction * Android.OS.Bundle -> unit

Parameters

args
Bundle
Attributes

Remarks

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

SendCustomAction(String, Bundle)

Send the id and args from a custom action back for the MediaSession to perform.

[Android.Runtime.Register("sendCustomAction", "(Ljava/lang/String;Landroid/os/Bundle;)V", "")]
public void SendCustomAction (string action, Android.OS.Bundle? args);
[<Android.Runtime.Register("sendCustomAction", "(Ljava/lang/String;Landroid/os/Bundle;)V", "")>]
member this.SendCustomAction : string * Android.OS.Bundle -> unit

Parameters

action
String

The action identifier of the PlaybackState.CustomAction as specified by the MediaSession.

args
Bundle

Optional arguments to supply to the MediaSession for this custom action.

Attributes

Remarks

Send the id and args from a custom action back for the MediaSession to perform.

Java documentation for android.media.session.MediaController.TransportControls.sendCustomAction(java.lang.String, android.os.Bundle).

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