SessionCommandGroup.Builder
public
static
final
class
SessionCommandGroup.Builder
extends Object
| java.lang.Object | |
| ↳ | androidx.media2.SessionCommandGroup.Builder |
Builds a SessionCommandGroup object.
Summary
Public constructors | |
|---|---|
SessionCommandGroup.Builder()
|
|
SessionCommandGroup.Builder(SessionCommandGroup commandGroup)
Creates a new builder for |
|
Public methods | |
|---|---|
SessionCommandGroup.Builder
|
addAllPredefinedCommands(int version)
Adds all predefined session commands except for the commands added after the specified version without default implementation. |
SessionCommandGroup.Builder
|
addCommand(SessionCommand command)
Adds a command to this command group. |
SessionCommandGroup.Builder
|
addCommand(int commandCode)
Adds a predefined command with given |
SessionCommandGroup
|
build()
Builds |
SessionCommandGroup.Builder
|
removeCommand(SessionCommand command)
Removes a command from this group which matches given |
SessionCommandGroup.Builder
|
removeCommand(int commandCode)
Removes a command from this group which matches given |
Inherited methods | |
|---|---|
Public constructors
SessionCommandGroup.Builder
public SessionCommandGroup.Builder ()
SessionCommandGroup.Builder
public SessionCommandGroup.Builder (SessionCommandGroup commandGroup)
Creates a new builder for SessionCommandGroup with commands copied from another
SessionCommandGroup object.
Public methods
addAllPredefinedCommands
public SessionCommandGroup.Builder addAllPredefinedCommands (int version)
Adds all predefined session commands except for the commands added after the specified version without default implementation. This provides convenient way to add commands with implementation.
When you update support library version, it's recommended to take a look
SessionCommand to double check whether this only adds commands that you want.
You may increase the version here.
| Parameters | |
|---|---|
version |
int: command version |
| Returns | |
|---|---|
SessionCommandGroup.Builder |
|
addCommand
public SessionCommandGroup.Builder addCommand (SessionCommand command)
Adds a command to this command group.
| Parameters | |
|---|---|
command |
SessionCommand: A command to add. Shouldn't be null.
|
| Returns | |
|---|---|
SessionCommandGroup.Builder |
|
addCommand
public SessionCommandGroup.Builder addCommand (int commandCode)
Adds a predefined command with given commandCode to this command group.
| Parameters | |
|---|---|
commandCode |
int: A command code to add.
Shouldn't be SessionCommand.COMMAND_CODE_CUSTOM.
|
| Returns | |
|---|---|
SessionCommandGroup.Builder |
|
build
public SessionCommandGroup build ()
Builds SessionCommandGroup.
| Returns | |
|---|---|
SessionCommandGroup |
a new SessionCommandGroup.
|
removeCommand
public SessionCommandGroup.Builder removeCommand (SessionCommand command)
Removes a command from this group which matches given command.
| Parameters | |
|---|---|
command |
SessionCommand: A command to find. Shouldn't be null.
|
| Returns | |
|---|---|
SessionCommandGroup.Builder |
|
removeCommand
public SessionCommandGroup.Builder removeCommand (int commandCode)
Removes a command from this group which matches given commandCode.
| Parameters | |
|---|---|
commandCode |
int: A command code to find.
Shouldn't be SessionCommand.COMMAND_CODE_CUSTOM.
|
| Returns | |
|---|---|
SessionCommandGroup.Builder |
|
Interfaces
Classes
- CallbackMediaItem
- CallbackMediaItem.Builder
- DataSourceCallback
- FileMediaItem
- FileMediaItem.Builder
- HeartRating
- MediaBrowser
- MediaBrowser.BrowserCallback
- MediaBrowser.BrowserResult
- MediaController
- MediaController.ControllerCallback
- MediaController.ControllerResult
- MediaController.PlaybackInfo
- MediaItem
- MediaItem.Builder
- MediaLibraryService
- MediaLibraryService.LibraryParams
- MediaLibraryService.LibraryParams.Builder
- MediaLibraryService.LibraryResult
- MediaLibraryService.MediaLibrarySession
- MediaLibraryService.MediaLibrarySession.Builder
- MediaLibraryService.MediaLibrarySession.MediaLibrarySessionCallback
- MediaMetadata
- MediaMetadata.Builder
- MediaPlayer
- MediaPlayer.PlayerCallback
- MediaPlayer.TrackInfo
- MediaSession
- MediaSession.Builder
- MediaSession.CommandButton
- MediaSession.CommandButton.Builder
- MediaSession.ControllerInfo
- MediaSession.SessionCallback
- MediaSession.SessionResult
- MediaSessionManager
- MediaSessionService
- MediaSessionService.MediaNotification
- MediaTimestamp
- PercentageRating
- PlaybackParams
- PlaybackParams.Builder
- SessionCommand
- SessionCommandGroup
- SessionCommandGroup.Builder
- SessionPlayer
- SessionPlayer.PlayerCallback
- SessionPlayer.PlayerResult
- SessionToken
- StarRating
- SubtitleData
- ThumbRating
- TimedMetaData
- UriMediaItem
- UriMediaItem.Builder
- VideoSize