Closed junya100 closed 2 years ago
According to the docs Android 12 enforce mutability flag for each pending intents. I will check this and open a PR.
🎉 This change has been released in version 2.0.6
The label state:released
cannot be used in combination with state:needs-investigation
.
New Issue Checklist
Issue Description
Steps to reproduce
Call ParsePushBroadcastReceiver#onPushReceive method.
Actual Outcome
Caused by: java.lang.IllegalArgumentException: my.package: 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 com.parse.ParsePushBroadcastReceiver.getNotification(ParsePushBroadcastReceiver.java:430) at com.parse.ParsePushBroadcastReceiver.onPushReceive(ParsePushBroadcastReceiver.java:168)
Expected Outcome
No exception.
Environment
any Parse Android SDK version with Android12 and targetSDKVersion 31
Parse Android SDK
2.0.3
Android12
Logs