My app uses Parse SDK for Android and GCM to get notification after a change on Parse database.
The app's onCreate() calls the line:
ParseGCM.register(context);
On Android 13 device, this line causes a RuntimeException exception:
Caused by: java.lang.IllegalArgumentException: com.myapp: 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:401) at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:671) at android.app.PendingIntent.getBroadcast(PendingIntent.java:658) at com.firebase.jobdispatcher.GooglePlayDriver.(GooglePlayDriver.java:72) at com.parse.gcm.ParseGCM.register(ParseGCM.java:39)
The crash does not occur on Android 11