Added in API level 29

Builder


class Builder
kotlin.Any
   ↳ android.media.Session2CommandGroup.Builder

This API is not generally intended for third party application developers. Use the AndroidX Media2 session Library for consistent behavior across all devices.

Builds a Session2CommandGroup object.

Summary

Public constructors

Creates a new builder for Session2CommandGroup with commands copied from another Session2CommandGroup object.

Public methods
Session2CommandGroup.Builder

Adds a command to this command group.

Session2CommandGroup

Builds Session2CommandGroup.

Session2CommandGroup.Builder

Removes a command from this group which matches given command.

Public constructors

Builder

Added in API level 29
Builder()

Builder

Added in API level 29
Builder(commandGroup: Session2CommandGroup)

Creates a new builder for Session2CommandGroup with commands copied from another Session2CommandGroup object.

Parameters
commandGroup Session2CommandGroup: This value cannot be null.

Public methods

addCommand

Added in API level 29
fun addCommand(command: Session2Command): Session2CommandGroup.Builder

Adds a command to this command group.

Parameters
command Session2Command: A command to add. Shouldn't be null.
Return
Session2CommandGroup.Builder This value cannot be null.

build

Added in API level 29
fun build(): Session2CommandGroup

Builds Session2CommandGroup.

Return
Session2CommandGroup a new Session2CommandGroup. This value cannot be null.

removeCommand

Added in API level 29
fun removeCommand(command: Session2Command): Session2CommandGroup.Builder

Removes a command from this group which matches given command.

Parameters
command Session2Command: A command to find. Shouldn't be null.
Return
Session2CommandGroup.Builder This value cannot be null.