react-native-webrtc / react-native-incall-manager

Handling media-routes/sensors/events during a audio/video chat on React Native
ISC License
547 stars 191 forks source link

chooseAudioRoute seems not detecting the bluetooth connected to the phone. #203

Open jikseyres16 opened 1 year ago

jikseyres16 commented 1 year ago

The audio is not routed to the Bluetooth device even using chooseAudioRoute('BLUETOOTH') seems like it is not being detected.

I tried to change the parameter to 'EARPIECE' to see the result and check for the available device list and yeah no Bluetooth there:

{"availableAudioDeviceList": "[\"SPEAKER_PHONE\",\"EARPIECE\"]", "selectedAudioDevice": "EARPIECE"}

I tried not to call the InCallManager.start() then the phone routed the audio to the Bluetooth, but is used like this the routing back to speaker phone and earpiece will not be working.

I tested this on Samsung S22.

Anyidea why?

haisamMH commented 1 year ago

Yes the same issue here

QSJSI commented 1 year ago

same issue

minhvu7896 commented 1 year ago

Hi @jikseyres16.

Which function return {"availableAudioDeviceList": "[\"SPEAKER_PHONE\",\"EARPIECE\"]", "selectedAudioDevice": "EARPIECE"}?

I can't found that. Thank you.

aleksips commented 1 year ago

I have the same issue and bluetooth works indeed if InCallManager.start() is not called but then ofc changing the audio device does not work. I also heard that this would not happen on Android 11 and earlier but I haven't confirmed that yet.

st1992 commented 1 year ago

Same issue

jikseyres16 commented 1 year ago

@minhvu7896 , you can tapped and listen to the onAudioDeviceChanged event to see that availableAudioDeviceList

jikseyres16 commented 1 year ago

Hey Guys,

my workaround here is set the audio route as InCallManager.setForceSpeakerphoneOn(false) based on my understanding the documentation. This route the audio based on default one being used before the app runs of before you call the inCallManager.start().

this works though I think only on Android 11 and above.

katiahr commented 3 months ago

Any Solution for this issue?