setRouteInCommunicationMode abstract method

Future<void> setRouteInCommunicationMode(
  1. int route
)

Selects the audio route in communication volume mode.

This method is used in communication volume mode (MODE_IN_COMMUNICATION) to switch the audio route from a Bluetooth headset to the earpiece, wired headset, or speaker. This method is applicable only on Android. Using this method together with setEnableSpeakerphone may cause conflicts. Agora recommends using setRouteInCommunicationMode alone.

  • route The desired audio route: -1: System default audio route. 0: Headset with microphone. 1: Earpiece. 2: Headset without microphone. 3: Built-in speaker. 4: (Not supported) External speaker. 5: Bluetooth headset. 6: USB device.

Returns No practical meaning.

Implementation

Future<void> setRouteInCommunicationMode(int route);