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
App crashes when enabling background mode on Android 12+ (target SDK level 31+) #585
Comments
I've fixed the PendingIntent crash in my fork: https://github.com/Mforcen/cordova-plugin-background-mode Best regards. |
Thanks, this is actually really useful. The fork can be installed using
|
@Mforcen When you have time, it would be good if possible to upload or publish the plugin in npm so that it is available to the community, some time is usually wasted looking for how to solve the issue. I thank you very much in advance for your contribution. |
Yeah! Will do as soon as I get to my computer! |
Hi @wuitoonchi, I've seen that there are already other versions of this plugin on NPM with the fix applied. |
From Android 12 and newer, when trying to create a PendingIntent one of the following flags are required: FLAG_IMMUTABLE or FLAG_MUTABLE.
The offending API call is located in the file ForegroundService.java:223.
Best regards.
The text was updated successfully, but these errors were encountered: