Open imanpeeman opened 5 years ago
This can also cause strange echo problems on Samsung devices because incorrect speaker and microphone is used. I tried all available echo cancelation algorithms to solve the problem, but I was just this mode making problems, changing call mode solved echo problems.
The PjSipService.java sets the audio mode of the mAudioManager to MODE_IN_CALL.
if (callState == pjsip_inv_state.PJSIP_INV_STATE_EARLY || callState == pjsip_inv_state.PJSIP_INV_STATE_CONFIRMED) { mAudioManager.setMode(AudioManager.MODE_IN_CALL); }
This results in Android 9 for bad audio experience (you have to shout in the microphone to get audio). As states in the Android documentation, MODE_IN_CALL is used for cellular calls. For Sip calls the option MODE_IN_COMMUNICATION should be used.https://developer.android.com/reference/android/media/AudioManager#MODE_IN_CALL https://developer.android.com/reference/android/media/AudioManager#MODE_IN_COMMUNICATION
Just to let you know.
Thank you very much,mate. I also encountered a problem with too silent and deaf audio sound for microphone. Will try your solution
The PjSipService.java sets the audio mode of the mAudioManager to MODE_IN_CALL.
if (callState == pjsip_inv_state.PJSIP_INV_STATE_EARLY || callState == pjsip_inv_state.PJSIP_INV_STATE_CONFIRMED) { mAudioManager.setMode(AudioManager.MODE_IN_CALL); }
This results in Android 9 for bad audio experience (you have to shout in the microphone to get audio). As states in the Android documentation, MODE_IN_CALL is used for cellular calls. For Sip calls the option MODE_IN_COMMUNICATION should be used.https://developer.android.com/reference/android/media/AudioManager#MODE_IN_CALL https://developer.android.com/reference/android/media/AudioManager#MODE_IN_COMMUNICATION
Just to let you know.