Question Detail

Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent

1 months ago Views 186 Visit Post Reply

Fatal Exception: java.lang.IllegalArgumentException: in.app.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:377)
       at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:460)
       at android.app.PendingIntent.getActivity(PendingIntent.java:446)
       at android.app.PendingIntent.getActivity(PendingIntent.java:410)
       at com.app.package.fcm.FirebaseMessageReceiver.showNewNotification(FirebaseMessageReceiver.java:1)
       at com.google.firebase.messaging.FirebaseMessagingService.dispatchMessage(FirebaseMessagingService.java:46)
       at com.google.firebase.messaging.EnhancedIntentService.lambda$processIntent$0$com-google-firebase-messaging-EnhancedIntentService(EnhancedIntentService.java:24)
       at com.google.firebase.messaging.EnhancedIntentService$$ExternalSyntheticLambda1.run(EnhancedIntentService.java:24)
       at com.google.android.gms.common.api.internal.zza.run$bridge(zza.java:24)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at com.google.android.gms.common.util.concurrent.zza.run(zza.java:6)
       at java.lang.Thread.run(Thread.java:920)


Thread Reply