setRouteInCommunicationMode
Selects the audio playback route in communication audio mode.
virtual int setRouteInCommunicationMode(int route) = 0;
- Since
- v4.2.2
This method is used to switch the audio route from Bluetooth headphones to earpiece, wired headphones or speakers in communication audio mode ().
Attention: This method is for Android only.
Call timing
This method can be called either before or after joining the channel.
Restrictions
Using this method and the setEnableSpeakerphone method at the same time may cause conflicts. Agora recommends that you use the setRouteInCommunicationMode method alone.
Parameters
- route
- The audio playback route you want to use:
- -1: The default audio route.
- 0: Headphones with microphone.
- 1: Handset.
- 2: Headphones without microphone.
- 3: Device's built-in speaker.
- 4: (Not supported yet) External speakers.
- 5: Bluetooth headphones.
- 6: USB device.
Returns
Without practical meaning.