Open yashecosmob opened 1 year ago
Same here. Any updates?
@yashecosmob @gustavo-amaro did you find a solution?
In my case outgoing call. I must request bluetooth permission https://github.com/zoontek/react-native-permissions before. Note:
@anhquangtech Can you elaborate on how InCallManager.setForceSpeakerphoneOn(true/false) can be used to switch audio. Especially in iOS. I'm trying to connect to bluetooth in iOS and wasn't able to do so with this method. Is there documentation about the same?
InCallManager.setForceSpeakerphoneOn(true/false)
is just to route the audio to the Speakers, it has no effect for Bluetooth. For Bluetooth, try InCallManager.chooseAudioRoute('BLUETOOTH')
. Be aware that for incoming call, the call has to connect and only after you can route the audio to Bluetooth. So either way try calling the routing method with a button press after the call connection was already established, to test it, or just call it with a setTimeout of a few seconds.
@wilmxre Does this mean that it needs to be set a few seconds after InCallManager.start()
?
Also InCallManager.chooseAudioRoute('BLUETOOTH')
just returns the error TypeError: undefined is not a function
. I'm not sure it works anymore.
Oddly enough in Android the InCallManager.start()
alone seems to route it correctly between the phone's mic and bluetooth. But the same does not work for iOS.
InCallManager.chooseAudioRoute('BLUETOOTH') not working
As I am using setAudioRoute to set back to bluetooth and I am not able to switch
iOS Native function
What I tried: