setRouteInCommunicationMode

Selects the audio playback route in communication audio mode.

virtual int setRouteInCommunicationMode(int route) = 0;

Details

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 (). After the method is called successfully, the SDK will trigger the onAudioRoutingChanged callback to report the modified route.

Attention:

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.