Hello,
I get an error on Android 12 when receiving a push notification in the background. It works with Android 7.
java.lang.IllegalArgumentException: *packagename*: Targeting S+ (version 31 and later) requires one of FLAG_IMMUTABLE or FLAG_MUTABLE to be specified when creating a PendingIntent.
Be sure to 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.
As I have done so far
Did I forget something else?
Thanks and Greetings
I get an error on Android 12 when receiving a push notification in the background. It works with Android 7.
java.lang.IllegalArgumentException: *packagename*: Targeting S+ (version 31 and later) requires one of FLAG_IMMUTABLE or FLAG_MUTABLE to be specified when creating a PendingIntent.
Be sure to 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.
As I have done so far
- B4A version (12.0) uninstalled
- B4A 12.2 installed
- old FirebaseMessaging (service) deleted
- created a Receiver FirebaseMessaging as described here: https://www.b4x.com/android/forum/t...s-firebase-cloud-messaging-fcm.67716/#content
- added in manifest:
B4X:
AddPermission(android.permission.RECEIVE_BOOT_COMPLETED)
AddReceiverText(FirebaseMessaging, <intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>)
Did I forget something else?
Thanks and Greetings