Audio Controller
Controls different audio settings. This object is only valid while the connected SinchClient is started. As soon as the SinchClient is stopped, it is invalidated and must not be used.
By default Sinch SDK does not try to force any specific audio device for input or output or adjust volume levels. That means that if you don't interact with AudioController or Android AudioManager it's the OS that decides which device to use based on:
AudioManager.MODE_IN_COMMUNICATION that is set internally by the SDK during the time the call is established.
AudioManager.STREAM_VOICE_CALL being the type of the stream the audio is played on.
You have several options to manipulate this behavior:
Use enableSpeaker / disableSpeaker methods (see method specific docs for more information).
Use enableAutomaticAudioRouting to allow the SDK to select automatically the communication device.
Implement your own logic based on callbacks SDK provides and interacting with Android AudioManager directly.
See also
Types
Automatic routing configuration data.
Functions
Disables automatic audio routing (AAR). When AAR is disabled use AudioController.enableSpeaker to toggle between speakerphone and earpiece.
Disables speaker mode.
Enables automatic audio routing between earpiece, speakerphone, wired headset and bluetooth audio devices. Priorities are following:
Enables speaker mode.
Sets a listener for the local audio listener.