twilio / audioswitch

An Android audio management library for real-time communication apps.
Apache License 2.0
163 stars 50 forks source link

How to change default priority ? #81

Closed rulfox closed 3 years ago

rulfox commented 3 years ago

How to change the priority from

BluetoothHeadset -> WiredHeadset -> Earpiece -> Speakerphone to BluetoothHeadset -> WiredHeadset -> Speakerphone -> Earpiece

Alton09 commented 3 years ago

This is supported as of 1.1.0. Here's how to configure it for your use case:

val audioSwitch = AudioSwitch(application, preferredDeviceList = listOf(BluetoothHeadset::class.java, WiredHeadset::class.java, Speakerphone::class.java, Earpiece::class.java))
Alton09 commented 3 years ago

Closing for now. Please feel free to reach out if additional help is needed when using this feature.