Skip to main content
Version: 0.1.x

Change Input/Output Device - Android

During the meeting at any point a participant wishes to switch his/her audio or video device, it can be done using the below mentioned methods.

Changing Input/Output Audio Device


  • The getMics() method will return a list of all available microphones that are connected to the mobile device.

  • This method will return a Set of AppRTCAudioManager.AudioDevice.

  private fun getMics(): MutableSet<AppRTCAudioManager.AudioDevice>? {
val mics= meeting!!.mics
return mics // returns all connected mics


  • Participant can change the audio device using changeMic(AppRTCAudioManager.AudioDevice device) method of Meeting class.

  • Parameters that can be passed to changeMic are

    Audio DevicesUsage
    AppRTCAudioManager.AudioDevice.BLUETOOTHFor Bluetooth Device.
    AppRTCAudioManager.AudioDevice.WIRED_HEADSETFor Wired Handset Device.
    AppRTCAudioManager.AudioDevice.SPEAKER_PHONEFor Inbuilt - Speaker Device
    AppRTCAudioManager.AudioDevice.EARPIECEFor Earpiece Device
  • When participant changes the Mic, AppRTCAudioManager.AudioManagerEvents() is triggered which can be set to Meeting class by using setAudioDeviceChangeListener().


btnChangeMic!!.setOnClickListener { _: View? ->
// Change Mic during Meeting

private fun setAudioDeviceListeners() {
meeting!!.setAudioDeviceChangeListener(object : AudioManagerEvents {
override fun onAudioDeviceChanged(
selectedAudioDevice: AppRTCAudioManager.AudioDevice,
availableAudioDevices: Set<AppRTCAudioManager.AudioDevice>
) {
when (selectedAudioDevice) {
AppRTCAudioManager.AudioDevice.BLUETOOTH ->
Toast.makeText(this@MainActivity, "Selected AudioDevice: BLUETOOTH", Toast.LENGTH_SHORT).show()

AppRTCAudioManager.AudioDevice.WIRED_HEADSET ->
Toast.makeText(this@MainActivity, "Selected AudioDevice: WIRED_HEADSET", Toast.LENGTH_SHORT).show()

AppRTCAudioManager.AudioDevice.SPEAKER_PHONE ->
Toast.makeText(this@MainActivity, "Selected AudioDevice: SPEAKER_PHONE", Toast.LENGTH_SHORT).show()

AppRTCAudioManager.AudioDevice.EARPIECE ->
Toast.makeText(this@MainActivity, "Selected AudioDevice: EARPIECE", Toast.LENGTH_SHORT).show()

override fun onCreate(savedInstanceState: Bundle?) {
// ...
  • To use Bluetooth device, you must declare BLUETOOTH permission in AndroidManifest.xml file.
<manifest ... >
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

Changing Camera Input Device


  • By using changeWebcam() function, a participant can stream from front / rear camera during the meeting.


  btnWebcam!!.setOnClickListener {
// Change Webcam during Meeting

API Reference

The API references for all the methods and events utilised in this guide are provided below.

Got a Question? Ask us on discord