-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Background-Mode pauses my background music in iOS #437
Comments
this is because this plugin plays a small audio file in the background to simulate legitimate activity in the background, this audio will steal the audio session. You can easily modify the plugin to just not play the audio if you have valid background use cases which will keep things active, which is a better approach for anything being distributed anyway. |
Thanks! does this mean, if I need a background process (does not need any audio), the small audio file still needs to play? |
@wynngd i'm facing the same error, did you any solution ? |
I didn’t get a fix for this one. We’ll try to fix it on our next version. I’ll update the this thread when I come up with one. |
I think this may be related to a code change to APPBackgroundMode.m (commit e939b13 on Jan 9, 2018) where "withOptions:AVAudioSessionCategoryOptionMixWithOthers" was removed, i.e.: [session setCategory:AVAudioSessionCategoryPlayback was changed to: [session setCategory:AVAudioSessionCategoryPlayback |
Is now working pretty fine. Thank you! |
I can confirm that modifying the APPBackgroundMode.m file as noted above fixed the issue of stopping my music on iOS.
This fix also worked for me. |
i think this Plugin is not maintained anymore, so i decided to create a new one and fix this Issue. It also has a Ionic Wrapper, so go ahead and use this: https://github.com/HansKrywaa/cordova-plugin-advanced-background-mode |
While playing music using in the background via my media apps (Apple Music, or Spotify), the music pauses whenever I launches my ionic app 3.9 with background-mode. I am using the head version and Ionic 3.9.2, I've disabled the Audio, Airplay, and Picture in Picture in Capabilities in XCode as well. Is there a way to go around this issue? Thank you!
The text was updated successfully, but these errors were encountered: