Can't use speaker, just earpiece

Hi all,

I have a RN app using react-native-webrtc and lib-jitsi-meet. All is working fine except the audio output. I would like to use the speaker instead of the earpiece. I tried react-native-incall-manager on this way:

import InCallManager from 'react-native-incall-manager'
// during my component initialisation
InCallManager.start({media: 'video'}) 

I’m able to see with logcat that is action in done, but audio still comes from earpiece

D/InCallManager: setSpeakerphoneOn(): true
D/InCallManager: setForceSpeakerphoneOn() flag: 1
D/InCallManager: --- updateAudioDeviceState: wired headset=false, BT state=UNINITIALIZED
D/InCallManager: Device status: available=[SPEAKER_PHONE, EARPIECE], selected=SPEAKER_PHONE, user selected=SPEAKER_PHONE
D/InCallManager: --- updateAudioDeviceState done

Any idea why is not working?

usually having the first line i.e InCallManager.start with media ‘video’ should do the trick which enables the Automatic Basic Behavior and forces speaker, does that alone without the further two lines not work for you?

I managed to get it working. Was a silly thing. This permission was missing :smile:

<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
1 Like