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