-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setSpeakerPhoneOn not working for incoming call Android #212
Comments
same issue for me |
Same here. Is a Samsung device @edritech93? |
Tested with Samsung and Oppo both Android 12 and it didn't work. Neither setForceSpeakerphoneOn nor setSpeakerphoneOn is working. Looking at the logs, I see it update the defaultAudioMode but it didn't route the audio to the phone speaker.
I'm calling the .start before trying to change the audio to the speaker. |
If you are using RN-InCallManager in conjunction with RN-CallKeep, remember to call RNCallKeep.toggleAudioRouteSpeaker() after calling setForceSpeakerphoneOn(), for some reason the RNCallKeep has control if you have called the RNCallKeep.startCall() first. |
hey @mariouzae, does this work for you 100% of the time? |
For me audio switch worked after adding permission in AndroidManifest.xml file
|
When il make incoming call and accept . il try setSpeakerPhoneOn but its not working.
But for outgoing call its working. I use sip js react-native webrtc and react native incall manager.
const onAccepted = (data: any) => { if (data && data.route === 'incoming') { setCallActive(true); setIsCalling(false); InCallManager.start({media: 'audio'}); RNCallKeep.setCurrentCallActive(currentCallUUID); } else if (data && data.route === 'outgoing') { RNCallKeep.setCurrentCallActive(currentCallUUID); setIsCalling(false); InCallManager.stopRingback(); } }
const handleSpeaker = (isSpeaker: boolean) => { InCallManager.setSpeakerphoneOn(isSpeaker); }
The text was updated successfully, but these errors were encountered: