react-native-webrtc / react-native-webrtc/react-native-incall-manager
MediaButton can't work with Bluetooth SCO
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 597
- Forks
- 201
- Avg merge
- 2h 42m
- Merged PRs (30d)
- 1
Description
Hi !
We've have integrated react-native-incall-manager in your app, that's a great lib !
We digged a little bit to know why the MediaButton wasn't called during a call (when hanging up a call from a car for instance).
We found that due to startBluetoothSco the device is considered by android like an simple speaker and the hangup button of the bluetooth device will only disconnect the audio channel.
We found the same issue here and here.
As a workaround the have to listen to onAudioDeviceChanged and check that the change from selectedAudioDevice has changed from BLUETOOTH to EARPIECE without any interaction in our app (so we are sur that the device is disconnected from the hangup button).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with android/src/main/java/com/zxcpoiu/incallmanager/AppRTC/AppRTCBluetoothManager.java around startBluetoothSco at line 328, then trace the MediaButton and onAudioDeviceChanged behavior. Reproduce a Bluetooth headset hangup during a call; done when the hangup is handled as the expected media-button event rather than only disconnecting the audio channel.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, react-native
- Domain
- audio-video-rtc, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100