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

[Android] - Background Microphone & Camera turning off after 1 minute in Expo Custom-Dev-Client

Open
#183 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
597
Forks
201
Avg merge
2h 42m
Merged PRs (30d)
1

Description

Preface: I did not need any config-plugins for Expo, just installed it and it runs successfully on both Android & iOS.

I am able to call: InCallManager.start({ media: "video" }); and it's functioning as expected, I've had proximity sensors disabled due to this, and even the Automatic Basic Behavior is functioning as expected.

So, with regards to the issue, foremost it's not really a calling application being made; it's a video conference app, but regardless, everything is functioning as expected however only on Android, once we go to background / lock the screen, after a minute, the outgoing microphone and camera ceases to function, going back to foreground resumes the microphone [but not the camera apparently, might be a related issue]. Clarification: incoming audios are still heard

From what I've read so far, it's to do with Android 11's ForegroundServices, or more specifically, needing ConnectionService for it to function from background. I attempted 'react-native-background-timer' as well to no avail.

Following is my package.json:

        "expo": "^43.0.3",
        "@config-plugins/react-native-webrtc": "^2.0.0",
        "react-native-webrtc": "^1.94.1",
        "react-native-incall-manager": "^3.3.0",

So what sort of solutions can be attempted with this library?

Thanks so much for your time and consideration!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Android background and locked-screen behavior with Expo 43.0.3, react-native-webrtc 1.94.1, and react-native-incall-manager 3.3.0, then investigate Android 11 foreground-service and ConnectionService requirements. Done means the outgoing microphone and camera continue functioning after the app is backgrounded or the screen is locked.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, javascript
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.