Description:
Android 12 recently made it mandatory to use FLAG_IMMUTABLE or FLAG_MUTABLE, this makes the application crash as soon as it's opened.
Environment
react-native-onesignal version: 4.3.1
added to the project with yarn
Steps to Reproduce Issue:
- Install one signal
- Initialise onesignal in react native
- Run the app on an Android 12 device
Anything else:
(crash stacktraces, as well as any other information here)
Process: , PID: 19559
java.lang.IllegalArgumentException: : Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
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)
Description:
Android 12 recently made it mandatory to use
FLAG_IMMUTABLEorFLAG_MUTABLE, this makes the application crash as soon as it's opened.Environment
react-native-onesignal version: 4.3.1
added to the project with yarn
Steps to Reproduce Issue:
Anything else:
(crash stacktraces, as well as any other information here)