How I can select which Microphones I use on Android?

Viewed 413

I have an app who are connected with webrtc. I have to had a selected part, where I can select which mic I use.

I already can display the list of mic connected (intern, Bluetooth, ...), I can return some value when I select one of this list. Those values can be name, id type ... For do this, i use getDevices(AudioManager.GET_DEVICES_INPUTS)

So How I can select one of these devices?

Thanks for any help. A link to an example or tutorial can be good!

1 Answers

getDevices (AudioManager.GET_DEVICES_INPUTS) returns a list of AudioDeviceInfo instances. Select the one that you need from the list, and pass that instance to an AudioRecord object via a call to setPreferredDevice

Related