Session2CommandGroup.Builder


public static final class Session2CommandGroup.Builder
extends Object

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

Builder()
Builder(Session2CommandGroup commandGroup)

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

Public methods

Session2CommandGroup.Builder addCommand(Session2Command command)

Adds a command to this command group.

Session2CommandGroup build()

Builds Session2CommandGroup.

Session2CommandGroup.Builder removeCommand(Session2Command command)

Removes a command from this group which matches given command.

Inherited methods

Public constructors

Builder

Added in API level 29
public Builder ()

Builder

Added in API level 29
public Builder (Session2CommandGroup commandGroup)

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
public Session2CommandGroup.Builder addCommand (Session2Command command)

Adds a command to this command group.

Parameters
command Session2Command: A command to add. Shouldn't be null.

Returns
Session2CommandGroup.Builder This value cannot be null.

build

Added in API level 29
public Session2CommandGroup build ()

Builds Session2CommandGroup.

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

removeCommand

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

Removes a command from this group which matches given command.

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

Returns
Session2CommandGroup.Builder This value cannot be null.