-
Notifications
You must be signed in to change notification settings - Fork 226
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
Keep audio on background #176
Comments
you may need to add foreground service to the android code. |
@LichKing-2234 Any chance you have more info on how to integrate this? Shouldn't this be included in this SDK? |
Although we will not integrate Callkit (iOS) and ConnectionService (Android) in the SDK in the near future, if you just want the app to keep calling in the background, you can call |
@LichKing-2234 Where should I add the code |
@tak-bro RN SDK also export |
Thanks! |
Hi fellows, UPDATE: Found it. |
@LichKing-2234 what do you mean by export the function? Is |
@eyalcohen4 any problem? |
audio not working when app goes in backgroud after 1 min. I had set await _engine.setParameters('{"che.audio.opensl":true}'); |
@dhavalagile you should start a foreground service |
Any success on starting a foreground service? I have no android coding experience, so for me its super confusing |
How about for iOS? any web document or information on this? I want to keep audio on as well when app goes into background. |
Does this need to add background processing and fetch to the info,plist for iOS on xcode? |
I have successfully enabled this on iOS by enabling the VoIP and Audio modes. How do we do it on React native Android? |
@hongzhou85 I have commented above. |
@hongzhou85 , can you share some code SS for doing this? |
@jaymovaliya this one for ios would work |
For Android, I'm going to attempt this for foreground service. Another paid alternative may be this: Otherwise, for React Native you would have to code the headless js, which has little example on how to do it. |
How did you do this? |
My app also closes after exactly 5 seconds in background, although the user is in an active call. Have you found a solution for this? |
Hi,
In ANDROID, you have to run a foreground service which is listed below, ANDROID FOREGROUND SERVICE: I use this package for foreground service: @supersami/rn-foreground-service
|
Follwing this #176 (comment) approach has rejected my ios app from app store saying that -
|
I believe this reply means you have not utilized any VoIP features in your App, so including it is not required. Appstore do not accept additional permission request without having actual features using the permission. |
Hey @SamarthKejriwal did you get this sorted? My app just got rejected from Apple for the exact same reason. Why is this being suggested as an approach? Is there another solution to keep audio in background? |
I got the same thing… any advice |
@cranberry08 I removed the VOIP background mode and just left in the Audio, Air Play, Picture in Picture. https://docs.agora.io/en/Voice/ios_audio?platform=iOS#additional-settings-and-permissions Those docs there led me to try that out. Apple accepted our app and it seems to work fine when in the background. Apple review did ask me to make a video demonstrating why I needed background audio capabilities. |
Hello Nick,
Thank you!! That was very helpful. Good luck to you.
…On Sat, Apr 16, 2022 at 1:47 PM Nick Young ***@***.***> wrote:
@cranberry08 <https://github.com/cranberry08> I removed the VOIP
background mode and just left in the Audio, Air Play, Picture in Picture.
https://docs.agora.io/en/Voice/ios_audio?platform=iOS#additional-settings-and-permissions
Those docs there led me to try that out.
Apple accepted our app and it seems to work fine when in the background.
Apple review did ask me to make a video demonstrating why I needed
background audio capabilities.
—
Reply to this email directly, view it on GitHub
<#176 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYV5R5VPEY4HVH6BD3GGI2LVFMKLXANCNFSM4MTNJLVQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
is there any updates form agora sdk for enabling the voice call even if the app is in the background?.what is the best solution for this problem |
Same issue here, any built-in solution from Agora to achieve this on Android without having to write a java service to do this? |
Right now, switching to another app or locking the phone shuts the sound down. Is there a way to keep it running ?
The text was updated successfully, but these errors were encountered: