Hi,
I tested this locally on a Pixel 8 Pro with Bluetooth earbuds, and it's working for me. I configured CameraX to use the MIC as the audio source, and set the audio output to the TYPE_BLUETOOTH_SCO device using AudioManager.setCommunicationDevice() (within onResume()). This successfully recorded audio from the Bluetooth earbuds. I also tried the deprecated setBluetoothScoOn() method, which worked as well.
Under the hood, CameraX utilizes AudioRecord for audio recording, so the configuration CameraX could change is only AudioRecord.Builder#setAudioSource().
Could you please share the device model and build you're testing on, along with a relevant code snippet? This will help in understanding any potential discrepancies. Thank you.
By the way, if you're using the latest version of CameraX, you can directly set the audio source using Recorder.Builder().setAudioSource(MIC) instead of using reflection. However, you might still need to suppress some lint warnings as this method is currently internal, and the MIC constant isn't officially added.
Best regards,
Ming-Da