react-native-webrtc / react-native-webrtc/react-native-callkeep
react-native-incall-manager coop
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 511
- Avg merge
- 9h 12m
- Merged PRs (30d)
- 2
Description
Bug report
-
I've checked the example to reproduce the issue.
-
Reproduced on:
-
Android
-
iOS
Description
I'm using https://github.com/react-native-webrtc/react-native-incall-manager to manage audio during call ... Works fine, also with BT device. However, as soon as I also use https://github.com/react-native-webrtc/react-native-callkeep , things start going south ...
Problem 1: the motivation to use RNCallKeep is ONLY to keep the call alive, on Android, when phone is put to sleep. I'm using websockets for some realtime communication, registered and handled in js, however they get killed by OS if I dont use callkeep ... Which part of callkeep is responsible for OS preventing from killing app/connections/js thread, is it the telecomManager.placeCall (internal API)? Dont see anything else potentially capable of that ...
Problem 2: Given the above, i have to use callkeep for calls in background. But it doesnt play nicely with incallmanager
- callkeep grabs audio context internally, if this happens AFTER incallmanager obtains it, incallmanager is no longer usable (nor can it "steal the audio context from callkeep)
- have to use
didActivateAudioSessionevent with some timeout for detecting when is it safe to initialize incallmanager (it still works even with audio context already owned by callkeep) - even when I do the above, with BT device it seems TelecomManager? is messing with it quite a lot, sometimes it disconnects randomly, etc ... Without callkeep incallmanager works fine even with BT ...
I'm using callkeep in self-managed mode, manage permissions independently, so really the only value (crucial though) it provides for my use-case is that "magic" that prevents the app from getting websockets in js disconnected ...
Steps to Reproduce
Versions
- Callkeep: 4.2.0
- React Native: 0.64.1
- iOS: N/A
- Android: 11
- Phone model: Pixel 4XL
Logs
N/A
Paste here
N/A
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 by examining the Android TelecomManager and self-managed call behavior described for CallKeep 4.2.0, then reproduce the interaction with react-native-incall-manager on Android 11 and a Pixel 4XL. Compare audio-session ownership, Bluetooth behavior, and background WebSocket connectivity; done requires a confirmed cause or a documented limitation and reproducible guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native
- Domain
- audio-video-rtc, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100