cordova-plugin-background-mode icon indicating copy to clipboard operation
cordova-plugin-background-mode copied to clipboard

Ionic: Background mode does not work in Android 12 with API level 31

Open Topiya opened this issue 2 years ago • 8 comments

I have an Ionic 5 app with Audio player which allows user’s to play audio even if the app is in background using Ionic Background mode plugin

Above requirement works fine in API level 30. But after using API level 31, Ionic Background mode plugin doesn’t work in Android 12.

Can any one please suggest me to solve this issue?

Topiya avatar Oct 14 '22 09:10 Topiya

I have the same problem, the bad thing is that this plugin is no longer being maintained and updated.

On August 9th, a pull request was opened with the fix, but @katzer doesn't seem to look at this plugin anymore.

One solution is to find a new plugin or fork it by applying the fix.

brunochikuji avatar Oct 24 '22 15:10 brunochikuji

@brunochikuji Thanks for the reply.

One solution is to find a new plugin or fork it by applying the fix.

Here which fix you are telling me to apply?

Topiya avatar Oct 28 '22 12:10 Topiya

Does not seem to work on Android anymore... I am using Ionic 6 with capacitor 4.4.0 (tried with 4.2.0 as well) ... Crashes on Android whereas works fine on iOS.

ChandraTejoma avatar Nov 01 '22 05:11 ChandraTejoma

me using https://github.com/FWiner/cordova-plugin-android-background-mode

atmanegara avatar Nov 12 '22 19:11 atmanegara

Did you find any solution? For me this is a project breaker, any idea?

ttimot24 avatar Jan 09 '23 18:01 ttimot24

I think i did. Android the fix was simple, iOS does not seem to work anymore. see https://github.com/katzer/cordova-plugin-background-mode/issues/576

alindzon avatar Jan 09 '23 18:01 alindzon

Thank you @alindzon!

It still not working for me. Is it working with sdk version 33? I'm not sure if I modified a the correct thing. Can you please create a pull request, where I can see the exact differences?

ttimot24 avatar Jan 11 '23 10:01 ttimot24