Bluetooth headset management
masterAudioSwitch supports multiple connected Bluetooth headsets, but it only tracks the single active headset in availableAudioDevices and selectedAudioDevice.
- Switching headsets: To switch between multiple connected Bluetooth headsets, the user must switch the active headset via the system Bluetooth settings. AudioSwitch will then propagate the change.
- Connection failures: If connecting to a Bluetooth headset fails, the library reverts the selected device (typically to the
Earpiece). - Monitoring: You can provide a
BluetoothHeadsetConnectionListenerto theAudioSwitchconstructor to monitor connection state changes and failures.