Description:
I'm getting the following error while integrating the OneSignal SDK on a Android project with targetSdk set to 31:
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.
Environment
- targetSdk and compileSdk set to 31
- OneSignal SDK added using the official docs (mavenCentral)
Steps to Reproduce Issue:
- Add the OneSignal SDK to a project with targetSdkVersion 31
- Initialize OneSignal on the Application class
- Compile and launch the app
Anything else:
(crash stacktraces, as well as any other information here)
Description:
I'm getting the following error while integrating the OneSignal SDK on a Android project with targetSdk set to 31:
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.Environment
Steps to Reproduce Issue:
Anything else:
(crash stacktraces, as well as any other information here)