I was happy with building app on PhoneGap and it was working very smooth for me. Now that apache PhoneGap has stopped giving support and apple is not accepting apps build with SDK <13, I had no another choice to change my environment from ionic cordova to ionic capacitor.
Upgrade works well. I’ve successfully upgraded from ionic v4 to ionic v5 using Angular 8. Background mode cordova plugin with ionic capacitor music control not working as expected. It plays the music in background and stopped after playing two music files.
Is this issue something related to audio session that we create when media creates. If so, how could I make it active all the time in background.
Hello, I am wondering if you were ever able to resolve this?
I have a html
This is for iOS. I have gone into xcode / signing & capabilities / background modes.
It doesn’t seem to matter what I check or uncheck. Once I do a build and test the audio always stops after about :30 seconds once I am in background mode.
I had to switch back to CORDOVA plugin to make it work. I was trying to make it work with capacitor background plugin which was not stable at that time and causing a lot of trouble in my use case. It works for me with https://www.npmjs.com/package/cordova-plugin-background-mode-fixed: “^0.7.8” version and “@ionic-native/background-mode”: “^4.20.0”,
Thanks for the reply. Unfortunately the following error is still thrown: [ProcessSuspension] Background task expired while holding WebKit ProcessAssertion
I tried it with both cordova-plugin-background-mode and cordova-plugin-background-mode-fixed both installed and separately as well. Either way the error was still thrown and the audio stopped playing after :30 seconds.
This looks like an issue with iOS 13 and above. And currently there doesn’t appear to be any work around. Audio playing in the background is an essential function to our App since we are a streaming music player.
If you have any suggestions for playing audio in the background on a Ionic Capacitor/Cordova App i’m up for any suggestions.