Description:
I got a runtime crash while trying to run the app targeting Android 12. The crash is related to the WorkManager version that is being used in OneSignal. The WorkManager version is less than 2.7.0. WorkManager 2.7.0-beta01 fixed the issue. Unfortunately, it is not stable yet.
Environment
targetSdkVersion 31
compileSdkVersion 31
Steps to Reproduce Issue:
- Add the OneSignal SDK to your project
- Change the
targetSdkVersion and the compileSdkVersion to 31
- Run the app
Anything else:
The WorkManager version used in OneSignal is
api 'androidx.work:work-runtime:[2.0.0, 2.5.99]'
Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:645)
at android.app.PendingIntent.getBroadcast(PendingIntent.java:632)
at androidx.work.impl.utils.ForceStopRunnable.getPendingIntent(ForceStopRunnable.java:273)
at androidx.work.impl.utils.ForceStopRunnable.isForceStopped(ForceStopRunnable.java:151)
at androidx.work.impl.utils.ForceStopRunnable.forceStopRunnable(ForceStopRunnable.java:171)
at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:102)
at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)
WorkManager
Pending intents mutability
Description:
I got a runtime crash while trying to run the app targeting Android 12. The crash is related to the WorkManager version that is being used in OneSignal. The WorkManager version is less than
2.7.0. WorkManager2.7.0-beta01fixed the issue. Unfortunately, it is not stable yet.Environment
targetSdkVersion 31
compileSdkVersion 31
Steps to Reproduce Issue:
targetSdkVersionand thecompileSdkVersionto 31Anything else:
The WorkManager version used in OneSignal is
api 'androidx.work:work-runtime:[2.0.0, 2.5.99]'WorkManager
Pending intents mutability