BluetoothCodecConfig.Builder
  public
  static
  final
  
  class
  BluetoothCodecConfig.Builder
  
    extends Object
  
  
  
  
  
  
| java.lang.Object | |
| ↳ | android.bluetooth.BluetoothCodecConfig.Builder | 
Builder for BluetoothCodecConfig.
 
By default, the codec type will be set to BluetoothCodecConfig.SOURCE_CODEC_TYPE_INVALID, the codec priority to BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT, the sample rate to BluetoothCodecConfig.SAMPLE_RATE_NONE, the bits per sample to BluetoothCodecConfig.BITS_PER_SAMPLE_NONE, the channel mode to BluetoothCodecConfig.CHANNEL_MODE_NONE, and all the codec specific values to 0.
Summary
Public constructors | |
|---|---|
      
      Builder()
      
      
     | 
  |
Public methods | |
|---|---|
        
        
        
        
        
        BluetoothCodecConfig
     | 
  
    
      
      build()
      
      
        Build   | 
  
        
        
        
        
        
        BluetoothCodecConfig.Builder
     | 
  
    
      
      setBitsPerSample(int bitsPerSample)
      
      
        Set the bits per sample for Bluetooth codec config.  | 
  
        
        
        
        
        
        BluetoothCodecConfig.Builder
     | 
  
    
      
      setChannelMode(int channelMode)
      
      
        Set the channel mode for Bluetooth codec config.  | 
  
        
        
        
        
        
        BluetoothCodecConfig.Builder
     | 
  
    
      
      setCodecPriority(int codecPriority)
      
      
        Set codec priority for Bluetooth codec config.  | 
  
        
        
        
        
        
        BluetoothCodecConfig.Builder
     | 
  
    
      
      setCodecSpecific1(long codecSpecific1)
      
      
        Set the first codec specific values for Bluetooth codec config.  | 
  
        
        
        
        
        
        BluetoothCodecConfig.Builder
     | 
  
    
      
      setCodecSpecific2(long codecSpecific2)
      
      
        Set the second codec specific values for Bluetooth codec config.  | 
  
        
        
        
        
        
        BluetoothCodecConfig.Builder
     | 
  
    
      
      setCodecSpecific3(long codecSpecific3)
      
      
        Set the third codec specific values for Bluetooth codec config.  | 
  
        
        
        
        
        
        BluetoothCodecConfig.Builder
     | 
  
    
      
      setCodecSpecific4(long codecSpecific4)
      
      
        Set the fourth codec specific values for Bluetooth codec config.  | 
  
        
        
        
        
        
        BluetoothCodecConfig.Builder
     | 
  
    
      
      setCodecType(int codecType)
      
      
        
      This method was deprecated
      in API level 35.
    use   | 
  
        
        
        
        
        
        BluetoothCodecConfig.Builder
     | 
  
    
      
      setExtendedCodecType(BluetoothCodecType codecType)
      
      
        Set codec type for Bluetooth codec config.  | 
  
        
        
        
        
        
        BluetoothCodecConfig.Builder
     | 
  
    
      
      setSampleRate(int sampleRate)
      
      
        Set sample rate for Bluetooth codec config.  | 
  
Inherited methods | |
|---|---|
Public constructors
Public methods
build
public BluetoothCodecConfig build ()
Build BluetoothCodecConfig.
| Returns | |
|---|---|
BluetoothCodecConfig | 
        new BluetoothCodecConfig built
 This value cannot be null. | 
      
setBitsPerSample
public BluetoothCodecConfig.Builder setBitsPerSample (int bitsPerSample)
Set the bits per sample for Bluetooth codec config.
| Parameters | |
|---|---|
bitsPerSample | 
        
          int: of this codec
 Value is BluetoothCodecConfig.BITS_PER_SAMPLE_NONE, BluetoothCodecConfig.BITS_PER_SAMPLE_16, BluetoothCodecConfig.BITS_PER_SAMPLE_24, or BluetoothCodecConfig.BITS_PER_SAMPLE_32 | 
      
| Returns | |
|---|---|
BluetoothCodecConfig.Builder | 
        the same Builder instance
 This value cannot be null. | 
      
setChannelMode
public BluetoothCodecConfig.Builder setChannelMode (int channelMode)
Set the channel mode for Bluetooth codec config.
| Parameters | |
|---|---|
channelMode | 
        
          int: of this codec
 Value is BluetoothCodecConfig.CHANNEL_MODE_NONE, BluetoothCodecConfig.CHANNEL_MODE_MONO, or BluetoothCodecConfig.CHANNEL_MODE_STEREO | 
      
| Returns | |
|---|---|
BluetoothCodecConfig.Builder | 
        the same Builder instance
 This value cannot be null. | 
      
setCodecPriority
public BluetoothCodecConfig.Builder setCodecPriority (int codecPriority)
Set codec priority for Bluetooth codec config.
| Parameters | |
|---|---|
codecPriority | 
        
          int: of this codec
 Value is BluetoothCodecConfig.CODEC_PRIORITY_DISABLED, BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT, or BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST | 
      
| Returns | |
|---|---|
BluetoothCodecConfig.Builder | 
        the same Builder instance
 This value cannot be null. | 
      
setCodecSpecific1
public BluetoothCodecConfig.Builder setCodecSpecific1 (long codecSpecific1)
Set the first codec specific values for Bluetooth codec config.
| Parameters | |
|---|---|
codecSpecific1 | 
        
          long: codec specific value or 0 if default | 
      
| Returns | |
|---|---|
BluetoothCodecConfig.Builder | 
        the same Builder instance
 This value cannot be null. | 
      
setCodecSpecific2
public BluetoothCodecConfig.Builder setCodecSpecific2 (long codecSpecific2)
Set the second codec specific values for Bluetooth codec config.
| Parameters | |
|---|---|
codecSpecific2 | 
        
          long: codec specific value or 0 if default | 
      
| Returns | |
|---|---|
BluetoothCodecConfig.Builder | 
        the same Builder instance
 This value cannot be null. | 
      
setCodecSpecific3
public BluetoothCodecConfig.Builder setCodecSpecific3 (long codecSpecific3)
Set the third codec specific values for Bluetooth codec config.
| Parameters | |
|---|---|
codecSpecific3 | 
        
          long: codec specific value or 0 if default | 
      
| Returns | |
|---|---|
BluetoothCodecConfig.Builder | 
        the same Builder instance
 This value cannot be null. | 
      
setCodecSpecific4
public BluetoothCodecConfig.Builder setCodecSpecific4 (long codecSpecific4)
Set the fourth codec specific values for Bluetooth codec config.
| Parameters | |
|---|---|
codecSpecific4 | 
        
          long: codec specific value or 0 if default | 
      
| Returns | |
|---|---|
BluetoothCodecConfig.Builder | 
        the same Builder instance
 This value cannot be null. | 
      
setCodecType
public BluetoothCodecConfig.Builder setCodecType (int codecType)
      This method was deprecated
      in API level 35.
    use BluetoothCodecType instead
  
Set codec type for Bluetooth codec config.
| Returns | |
|---|---|
BluetoothCodecConfig.Builder | 
        the same Builder instance
 This value cannot be null. | 
      
setExtendedCodecType
public BluetoothCodecConfig.Builder setExtendedCodecType (BluetoothCodecType codecType)
Set codec type for Bluetooth codec config.
| Parameters | |
|---|---|
codecType | 
        
          BluetoothCodecType: of this codec
 This value may be null. | 
      
| Returns | |
|---|---|
BluetoothCodecConfig.Builder | 
        the same Builder instance
 This value cannot be null. | 
      
setSampleRate
public BluetoothCodecConfig.Builder setSampleRate (int sampleRate)
Set sample rate for Bluetooth codec config.
| Returns | |
|---|---|
BluetoothCodecConfig.Builder | 
        the same Builder instance
 This value cannot be null. |