O Google tem o compromisso de promover a igualdade racial para as comunidades negras. Saiba como.

SessionCommand

class SessionCommand : VersionedParcelable
kotlin.Any
   ↳ androidx.media2.session.SessionCommand

Defines a command that a MediaController can send to a MediaSession.

If getCommandCode() isn't COMMAND_CODE_CUSTOM), it's predefined command. If getCommandCode() is COMMAND_CODE_CUSTOM), it's custom command and getCustomAction() shouldn't be null.

Summary

Constants
static Int

Command code for the custom command which can be defined by string action in the SessionCommand.

static Int

Command code for MediaBrowser#getChildren(String, int, int, LibraryParams).

static Int

Command code for MediaBrowser#getItem(String).

static Int

Command code for MediaBrowser#getLibraryRoot(LibraryParams).

static Int

Command code for MediaBrowser#getSearchResult(String, int, int, LibraryParams).

static Int

Command code for MediaBrowser#search(String, LibraryParams).

static Int

Command code for MediaBrowser#subscribe(String, LibraryParams).

static Int

Command code for MediaBrowser#unsubscribe(String).

static Int

Command code for MediaController#addPlaylistItem(int, String).

static Int

Command code for MediaController#deselectTrack(SessionPlayer.TrackInfo).

static Int

Command code for MediaController#getCurrentMediaItem().

static Int

Command code for MediaController#getPlaylist().

static Int

Command code for MediaController#getPlaylistMetadata().

static Int

Command code for MediaController#replacePlaylistItem(int, String).

static Int

Command code for MediaController#pause().

static Int

Command code for MediaController#play().

static Int

Command code for MediaController#prepare().

static Int

Command code for MediaController#removePlaylistItem(int).

static Int

Command code for MediaController#replacePlaylistItem(int, String).

static Int

Command code for MediaController#seekTo(long).

static Int

Command code for MediaController#selectTrack(SessionPlayer.TrackInfo).

static Int

Command code for MediaController#setMediaItem(String).

static Int

Command code for MediaController#setPlaylist(List, MediaMetadata).

static Int

Command code for MediaController#setRepeatMode(int).

static Int

Command code for MediaController#setShuffleMode(int).

static Int

Command code for MediaController#setPlaybackSpeed(float)}.

static Int

Command code for MediaController#setSurface(Surface).

static Int

Command code for MediaController#skipToNextPlaylistItem().

static Int

Command code for MediaController#skipToPlaylistItem(int).

static Int

Command code for MediaController#skipToPreviousPlaylistItem().

static Int

Command code for MediaController#updatePlaylistMetadata(MediaMetadata).

static Int

Command code for MediaController#fastForward().

static Int

Command code for MediaController#rewind().

static Int

Command code for MediaController#setMediaUri.

static Int

Command code for MediaController#setRating(String, Rating).

static Int

Command code for MediaController#skipBackward().

static Int

Command code for MediaController#skipForward().

static Int

Command code for MediaController#adjustVolume(int, int).

static Int

Command code for MediaController#setVolumeTo(int, int).

static Int

The first version of session commands.

static Int

The 2nd version of session commands.

Public constructors
<init>(commandCode: Int)

Constructor for creating a predefined command.

<init>(@NonNull action: String, @Nullable extras: Bundle?)

Constructor for creating a custom command.

Public methods
Boolean
equals(other: Any?)

Int

Gets the command code of a predefined command.

String?

Gets the action of a custom command.

Bundle?

Gets the extra bundle of a custom command.

Int

Constants

COMMAND_CODE_CUSTOM

static val COMMAND_CODE_CUSTOM: Int

Command code for the custom command which can be defined by string action in the SessionCommand.

Value: 0

COMMAND_CODE_LIBRARY_GET_CHILDREN

static val COMMAND_CODE_LIBRARY_GET_CHILDREN: Int

Command code for MediaBrowser#getChildren(String, int, int, LibraryParams).

Code version is COMMAND_VERSION_1.

Value: 50003

COMMAND_CODE_LIBRARY_GET_ITEM

static val COMMAND_CODE_LIBRARY_GET_ITEM: Int

Command code for MediaBrowser#getItem(String).

Code version is COMMAND_VERSION_1.

Value: 50004

COMMAND_CODE_LIBRARY_GET_LIBRARY_ROOT

static val COMMAND_CODE_LIBRARY_GET_LIBRARY_ROOT: Int

Command code for MediaBrowser#getLibraryRoot(LibraryParams).

Code version is COMMAND_VERSION_1.

Value: 50000

COMMAND_CODE_LIBRARY_GET_SEARCH_RESULT

static val COMMAND_CODE_LIBRARY_GET_SEARCH_RESULT: Int

Command code for MediaBrowser#getSearchResult(String, int, int, LibraryParams).

Code version is COMMAND_VERSION_1.

Value: 50006
static val COMMAND_CODE_LIBRARY_SEARCH: Int

Command code for MediaBrowser#search(String, LibraryParams).

Code version is COMMAND_VERSION_1.

Value: 50005

COMMAND_CODE_LIBRARY_SUBSCRIBE

static val COMMAND_CODE_LIBRARY_SUBSCRIBE: Int

Command code for MediaBrowser#subscribe(String, LibraryParams).

Code version is COMMAND_VERSION_1.

Value: 50001

COMMAND_CODE_LIBRARY_UNSUBSCRIBE

static val COMMAND_CODE_LIBRARY_UNSUBSCRIBE: Int

Command code for MediaBrowser#unsubscribe(String).

Code version is COMMAND_VERSION_1.

Value: 50002

COMMAND_CODE_PLAYER_ADD_PLAYLIST_ITEM

static val COMMAND_CODE_PLAYER_ADD_PLAYLIST_ITEM: Int

Command code for MediaController#addPlaylistItem(int, String).

Command would be sent directly to the player if the session doesn't reject the request through the SessionCallback#onCommandRequest(MediaSession, ControllerInfo, SessionCommand).

Code version is COMMAND_VERSION_1.

Value: 10013

COMMAND_CODE_PLAYER_DESELECT_TRACK

static val COMMAND_CODE_PLAYER_DESELECT_TRACK: Int

Command code for MediaController#deselectTrack(SessionPlayer.TrackInfo).

Command would be sent directly to the player if the session doesn't reject the request through the SessionCallback#onCommandRequest(MediaSessio