Added in API level 33

Builder

class Builder
kotlin.Any
   ↳ android.bluetooth.BluetoothCodecConfig.Builder

Builder for BluetoothCodecConfig.

By default, the codec type will be set to android.bluetooth.BluetoothCodecConfig#SOURCE_CODEC_TYPE_INVALID, the codec priority to android.bluetooth.BluetoothCodecConfig#CODEC_PRIORITY_DEFAULT, the sample rate to android.bluetooth.BluetoothCodecConfig#SAMPLE_RATE_NONE, the bits per sample to android.bluetooth.BluetoothCodecConfig#BITS_PER_SAMPLE_NONE, the channel mode to android.bluetooth.BluetoothCodecConfig#CHANNEL_MODE_NONE, and all the codec specific values to 0.

Summary

Public constructors

Public methods
BluetoothCodecConfig

Build BluetoothCodecConfig.

BluetoothCodecConfig.Builder
setBitsPerSample(bitsPerSample: Int)

Set the bits per sample for Bluetooth codec config.

BluetoothCodecConfig.Builder
setChannelMode(channelMode: Int)

Set the channel mode for Bluetooth codec config.

BluetoothCodecConfig.Builder
setCodecPriority(codecPriority: Int)

Set codec priority for Bluetooth codec config.

BluetoothCodecConfig.Builder
setCodecSpecific1(codecSpecific1: Long)

Set the first codec specific values for Bluetooth codec config.

BluetoothCodecConfig.Builder
setCodecSpecific2(codecSpecific2: Long)

Set the second codec specific values for Bluetooth codec config.

BluetoothCodecConfig.Builder
setCodecSpecific3(codecSpecific3: Long)

Set the third codec specific values for Bluetooth codec config.

BluetoothCodecConfig.Builder
setCodecSpecific4(codecSpecific4: Long)

Set the fourth codec specific values for Bluetooth codec config.

BluetoothCodecConfig.Builder
setCodecType(codecType: Int)

Set codec type for Bluetooth codec config.

BluetoothCodecConfig.Builder
setSampleRate(sampleRate: Int)

Set sample rate for Bluetooth codec config.

Public constructors

Builder

Added in API level 33
Builder()

Public methods

build

Added in API level 33
fun build(): BluetoothCodecConfig

Build BluetoothCodecConfig.

Return
BluetoothCodecConfig new BluetoothCodecConfig built This value cannot be null.

setBitsPerSample

Added in API level 33
fun setBitsPerSample(bitsPerSample: Int): BluetoothCodecConfig.Builder

Set the bits per sample for Bluetooth codec config.

Parameters
bitsPerSample Int: of this codec Value is android.bluetooth.BluetoothCodecConfig#BITS_PER_SAMPLE_NONE, android.bluetooth.BluetoothCodecConfig#BITS_PER_SAMPLE_16, android.bluetooth.BluetoothCodecConfig#BITS_PER_SAMPLE_24, or android.bluetooth.BluetoothCodecConfig#BITS_PER_SAMPLE_32
Return
BluetoothCodecConfig.Builder the same Builder instance This value cannot be null.

setChannelMode

Added in API level 33
fun setChannelMode(channelMode: Int): BluetoothCodecConfig.Builder

Set the channel mode for Bluetooth codec config.

Parameters
channelMode Int: of this codec Value is android.bluetooth.BluetoothCodecConfig#CHANNEL_MODE_NONE, android.bluetooth.BluetoothCodecConfig#CHANNEL_MODE_MONO, or android.bluetooth.BluetoothCodecConfig#CHANNEL_MODE_STEREO
Return
BluetoothCodecConfig.Builder the same Builder instance This value cannot be null.

setCodecPriority

Added in API level 33
fun setCodecPriority(codecPriority: Int): BluetoothCodecConfig.Builder

Set codec priority for Bluetooth codec config.

Parameters
codecPriority Int: of this codec Value is android.bluetooth.BluetoothCodecConfig#CODEC_PRIORITY_DISABLED, android.bluetooth.BluetoothCodecConfig#CODEC_PRIORITY_DEFAULT, or android.bluetooth.BluetoothCodecConfig#CODEC_PRIORITY_HIGHEST
Return
BluetoothCodecConfig.Builder the same Builder instance This value cannot be null.

setCodecSpecific1

Added in API level 33
fun setCodecSpecific1(codecSpecific1: Long): BluetoothCodecConfig.Builder

Set the first codec specific values for Bluetooth codec config.

Parameters
codecSpecific1 Long: codec specific value or 0 if default
Return
BluetoothCodecConfig.Builder the same Builder instance This value cannot be null.

setCodecSpecific2

Added in API level 33
fun setCodecSpecific2(codecSpecific2: Long): BluetoothCodecConfig.Builder

Set the second codec specific values for Bluetooth codec config.

Parameters
codecSpecific2 Long: codec specific value or 0 if default
Return
BluetoothCodecConfig.Builder the same Builder instance This value cannot be null.

setCodecSpecific3

Added in API level 33
fun setCodecSpecific3(codecSpecific3: Long): BluetoothCodecConfig.Builder

Set the third codec specific values for Bluetooth codec config.

Parameters
codecSpecific3 Long: codec specific value or 0 if default
Return
BluetoothCodecConfig.Builder the same Builder instance This value cannot be null.

setCodecSpecific4

Added in API level 33
fun setCodecSpecific4(codecSpecific4: Long): BluetoothCodecConfig.Builder

Set the fourth codec specific values for Bluetooth codec config.

Parameters
codecSpecific4 Long: codec specific value or 0 if default
Return
BluetoothCodecConfig.Builder the same Builder instance This value cannot be null.