I am using the latest Backendless SDK v6.3.4 and targeting Android SDK 31. When the device receives a push notification message the following crash happens:
E/BackendlessFCMService: Error processing push notification
java.lang.IllegalArgumentException: org.helpapaw.helpapaw: 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:382)
at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:465)
at android.app.PendingIntent.getActivity(PendingIntent.java:451)
at android.app.PendingIntent.getActivity(PendingIntent.java:415)
at com.backendless.push.BackendlessFCMService.fallBackMode(BackendlessFCMService.java:181)
at com.backendless.push.BackendlessFCMService.handleMessage(BackendlessFCMService.java:113)
at com.backendless.push.BackendlessFCMService.onMessageReceived(BackendlessFCMService.java:68)
at com.google.firebase.messaging.FirebaseMessagingService.dispatchMessage(com.google.firebase:firebase-messaging@@21.1.0:13)
at com.google.firebase.messaging.FirebaseMessagingService.passMessageIntentToSdk(com.google.firebase:firebase-messaging@@21.1.0:8)
at com.google.firebase.messaging.FirebaseMessagingService.handleMessageIntent(com.google.firebase:firebase-messaging@@21.1.0:3)
at com.google.firebase.messaging.FirebaseMessagingService.handleIntent(com.google.firebase:firebase-messaging@@21.1.0:3)
at com.google.firebase.messaging.EnhancedIntentService.lambda$processIntent$0$EnhancedIntentService(com.google.firebase:firebase-messaging@@21.1.0:1)
at com.google.firebase.messaging.EnhancedIntentService$$Lambda$0.run(Unknown Source:6)
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(com.google.android.gms:play-services-basement@@18.0.0:2)
at java.lang.Thread.run(Thread.java:920)
As the crash message says - PendingIntent
s on Android 31+ should have a mutability flag. The fix is rather easy - just add FLAG_IMMUTABLE in BackendlessFCMService.java:181
Hope this fill be fixed very soon!