Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

SessionCommandGroup

public final class SessionCommandGroup
extends Object implements VersionedParcelable

java.lang.Object
   ↳ androidx.media2.SessionCommandGroup


A set of SessionCommand which represents a command group.

Summary

Nested classes

class SessionCommandGroup.Builder

Builds a SessionCommandGroup object. 

Public constructors

SessionCommandGroup()

Default Constructor.

SessionCommandGroup(Collection<SessionCommand> commands)

Creates a new SessionCommandGroup with commands copied from another object.

Public methods

Set<SessionCommand> getCommands()

Gets all commands of this command group.

boolean hasCommand(int commandCode)

Checks whether this command group has a command that matches given commandCode.

boolean hasCommand(SessionCommand command)

Checks whether this command group has a command that matches given command.

Inherited methods

Public constructors

SessionCommandGroup

public SessionCommandGroup ()

Default Constructor.

SessionCommandGroup

public SessionCommandGroup (Collection<SessionCommand> commands)

Creates a new SessionCommandGroup with commands copied from another object.

Parameters
commands Collection: The collection of commands to copy.

Public methods

getCommands

public Set<SessionCommand> getCommands ()

Gets all commands of this command group.

Returns
Set<SessionCommand>

hasCommand

public boolean hasCommand (int commandCode)

Checks whether this command group has a command that matches given commandCode.

Parameters
commandCode int: A command code to find. Shouldn't be SessionCommand.COMMAND_CODE_CUSTOM.

Returns
boolean

hasCommand

public boolean hasCommand (SessionCommand command)

Checks whether this command group has a command that matches given command.

Parameters
command SessionCommand: A command to find. Shouldn't be null.

Returns
boolean