SessionCommand

public final class SessionCommand
extends Object implements VersionedParcelable

java.lang.Object
   ↳ 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

int COMMAND_CODE_CUSTOM

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

int COMMAND_CODE_LIBRARY_GET_CHILDREN

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

int COMMAND_CODE_LIBRARY_GET_ITEM

Command code for MediaBrowser.getItem(String).

int COMMAND_CODE_LIBRARY_GET_LIBRARY_ROOT

Command code for MediaBrowser.getLibraryRoot(LibraryParams).

int COMMAND_CODE_LIBRARY_GET_SEARCH_RESULT

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

int COMMAND_CODE_LIBRARY_SEARCH

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

int COMMAND_CODE_LIBRARY_SUBSCRIBE

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

int COMMAND_CODE_LIBRARY_UNSUBSCRIBE

Command code for MediaBrowser.unsubscribe(String).

int COMMAND_CODE_PLAYER_ADD_PLAYLIST_ITEM

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

int COMMAND_CODE_PLAYER_DESELECT_TRACK

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

int COMMAND_CODE_PLAYER_GET_CURRENT_MEDIA_ITEM

Command code for MediaController.getCurrentMediaItem().

int COMMAND_CODE_PLAYER_GET_PLAYLIST

Command code for MediaController.getPlaylist().

int COMMAND_CODE_PLAYER_GET_PLAYLIST_METADATA

Command code for MediaController.getPlaylistMetadata().

int COMMAND_CODE_PLAYER_MOVE_PLAYLIST_ITEM

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

int COMMAND_CODE_PLAYER_PAUSE

Command code for MediaController.pause().

int COMMAND_CODE_PLAYER_PLAY

Command code for MediaController.play().

int COMMAND_CODE_PLAYER_PREPARE

Command code for MediaController.prepare().

int COMMAND_CODE_PLAYER_REMOVE_PLAYLIST_ITEM

Command code for MediaController.removePlaylistItem(int).

int COMMAND_CODE_PLAYER_REPLACE_PLAYLIST_ITEM

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

int COMMAND_CODE_PLAYER_SEEK_TO

Command code for MediaController.seekTo(long).

int COMMAND_CODE_PLAYER_SELECT_TRACK

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

int COMMAND_CODE_PLAYER_SET_MEDIA_ITEM

Command code for MediaController.setMediaItem(String).

int COMMAND_CODE_PLAYER_SET_PLAYLIST

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

int COMMAND_CODE_PLAYER_SET_REPEAT_MODE

Command code for MediaController.setRepeatMode(int).

int COMMAND_CODE_PLAYER_SET_SHUFFLE_MODE

Command code for MediaController.setShuffleMode(int).

int COMMAND_CODE_PLAYER_SET_SPEED

Command code for MediaController.setPlaybackSpeed(float)}.

int COMMAND_CODE_PLAYER_SET_SURFACE

Command code for MediaController.setSurface(Surface).

int COMMAND_CODE_PLAYER_SKIP_TO_NEXT_PLAYLIST_ITEM

Command code for MediaController.skipToNextPlaylistItem().

int COMMAND_CODE_PLAYER_SKIP_TO_PLAYLIST_ITEM