-
Notifications
You must be signed in to change notification settings - Fork 459
Android 11 background audio #274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've made a super POC patch that fixes this on Android 11 by showing a persistent notification when a call is started. https://gist.github.com/grit96/597440c6a12243c6eecfc1b13c11833c |
Thanks for the tips! 👍 Currently, there are some android devices ( on android 8+ or 9+ I guess ) stop the audio when app in the background for a while. The solution is similar, to start a foreground service when a call start. So this may take into consideration (as a configurable opt in) that whether people already have their own foreground service flow or not. FWIW, This is a library can handle foreground service in js side: https://github.com/voximplant/react-native-foreground-service |
Hello, I'm using android 11 since the first beta and i don't have issue with audio in bacckground. I'm not sure to understand your issue... |
@sboily Android 11 now requires the app to start a foreground service in order to use the camera or microphone in the background. If you don't have this issue it may be that you already start a foreground service in your app. |
So this is what I was thinking the other day.... the connection service UI is classed as a fullscreen notification so gets classed as being foregrounded? |
@danjenkins I'm not sure. In my case I'm using |
With Android 11 upcoming there are some changes that will impact users of
react-native-callkeep
.The permissions are once again being tightened, use of microphone in the background being relevant to VoIP apps.
When a call is started through
CallKeep
, the app won't be able to use the microphone until it is brought to the foreground.It looks like there are some mitigations that can be put in place using foreground services.
The text was updated successfully, but these errors were encountered: