twilio/audioswitch

Use AudioManager.registerAudioDeviceCallback to avoid BLUETOOTH related permissions

davidliu opened this issue · 1 comments

The bluetooth permissions are currently only used to get information about Bluetooth devices, and aren't actually needed to connect/route audio to the bluetooth device.

This information can be gotten through AudioManager.registerAudioDeviceCallback since API 23, avoiding the need for these permissions. This is particularly important on API 31 and up, where the BLUETOOTH_CONNECT is a runtime permission (with a rather confusing permission message).