BluetoothLeAudioCodecConfig.Builder


public static final class BluetoothLeAudioCodecConfig.Builder
extends Object

java.lang.Object
   ↳ android.bluetooth.BluetoothLeAudioCodecConfig.Builder


Builder for BluetoothLeAudioCodecConfig.

By default, the codec type will be set to BluetoothLeAudioCodecConfig.SOURCE_CODEC_TYPE_INVALID

Summary

Public constructors

Builder()
Builder(BluetoothLeAudioCodecConfig config)

Public methods

BluetoothLeAudioCodecConfig build()

Build BluetoothLeAudioCodecConfig.

BluetoothLeAudioCodecConfig.Builder setBitsPerSample(int bitsPerSample)

Set the bits per sample for LE audio codec config.

BluetoothLeAudioCodecConfig.Builder setChannelCount(int channelCount)

Set the channel count for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder setCodecPriority(int codecPriority)

Set codec priority for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder setCodecType(int codecType)

Set codec type for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder setFrameDuration(int frameDuration)

Set the frame duration for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder setMaxOctetsPerFrame(int maxOctetsPerFrame)

Set the maximum octets per frame for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder setMinOctetsPerFrame(int minOctetsPerFrame)

Set the minimum octets per frame for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder setOctetsPerFrame(int octetsPerFrame)

Set the octets per frame for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder setSampleRate(int sampleRate)

Set sample rate for Bluetooth LE audio codec config.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

Added in API level 33
public Builder ()

Builder

Added in API level 33
public Builder (BluetoothLeAudioCodecConfig config)

Parameters
config BluetoothLeAudioCodecConfig: This value cannot be null.

Public methods

build

Added in API level 33
public BluetoothLeAudioCodecConfig build ()

Build BluetoothLeAudioCodecConfig.

Returns
BluetoothLeAudioCodecConfig new BluetoothLeAudioCodecConfig built This value cannot be null.

setBitsPerSample

Added in API level 33
public BluetoothLeAudioCodecConfig.Builder setBitsPerSample (int bitsPerSample)

Set the bits per sample for LE audio codec config.

Returns
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setChannelCount

Added in API level 33
public BluetoothLeAudioCodecConfig.Builder setChannelCount (int channelCount)

Set the channel count for Bluetooth LE audio codec config.

Parameters
channelCount int: of this codec Value is either 0 or a combination of BluetoothLeAudioCodecConfig.CHANNEL_COUNT_NONE, BluetoothLeAudioCodecConfig.CHANNEL_COUNT_1, and BluetoothLeAudioCodecConfig.CHANNEL_COUNT_2

Returns
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setCodecPriority

Added in API level 33
public BluetoothLeAudioCodecConfig.Builder setCodecPriority (int codecPriority)

Set codec priority for Bluetooth LE audio codec config.

Returns
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setCodecType

Added in API level 33
public BluetoothLeAudioCodecConfig.Builder setCodecType (int codecType)

Set codec type for Bluetooth LE audio codec config.

Returns
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setFrameDuration

Added in API level 33
public BluetoothLeAudioCodecConfig.Builder setFrameDuration (int frameDuration)

Set the frame duration for Bluetooth LE audio codec config.

Returns
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setMaxOctetsPerFrame

Added in API level 33
public BluetoothLeAudioCodecConfig.Builder setMaxOctetsPerFrame (int maxOctetsPerFrame)

Set the maximum octets per frame for Bluetooth LE audio codec config.

Parameters
maxOctetsPerFrame int: of this codec

Returns
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setMinOctetsPerFrame

Added in API level 33
public BluetoothLeAudioCodecConfig.Builder setMinOctetsPerFrame (int minOctetsPerFrame)

Set the minimum octets per frame for Bluetooth LE audio codec config.

Parameters
minOctetsPerFrame int: of this codec

Returns
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setOctetsPerFrame

Added in API level 33
public BluetoothLeAudioCodecConfig.Builder setOctetsPerFrame (int octetsPerFrame)

Set the octets per frame for Bluetooth LE audio codec config.

Parameters
octetsPerFrame int: of this codec

Returns
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setSampleRate

Added in API level 33
public BluetoothLeAudioCodecConfig.Builder setSampleRate (int sampleRate)

Set sample rate for Bluetooth LE audio codec config.

Returns
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

Discover the latest app development tools, platform updates, training, and documentation for developers across every Android device.

Updated Jun 18, 2024

Discover the latest app development tools, platform updates, training, and documentation for developers across every Android device.

Updated Dec 18, 2024

Discover the latest app development tools, platform updates, training, and documentation for developers across every Android device.

Updated Dec 18, 2024