gglaz Member Licensed User Longtime User Feb 8, 2023 #1 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 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: Copy 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
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 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: Copy 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
DonManfred Expert Licensed User Longtime User Feb 8, 2023 #2 you did installed a new SDK or are you still using your old SDK-Installation? Upvote 0
gglaz Member Licensed User Longtime User Feb 8, 2023 #3 Hello DonManfred, since the B4A 12.0 update I use platforms\android-33\android.jar in the manifest: B4X: Copy <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="31"/> Upvote 0
Hello DonManfred, since the B4A 12.0 update I use platforms\android-33\android.jar in the manifest: B4X: Copy <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="31"/>
asales Expert Licensed User Longtime User Feb 8, 2023 #4 Did you use the NB6 lib to show the notification? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 9, 2023 #5 Please post full error message with stack trace. Upvote 0
gglaz Member Licensed User Longtime User Feb 10, 2023 #6 Hello thank you very much for your help and time. I made a very stupid mistake. Instead of just adding references, I overwrote the installed-components.txt file with old values. Upvote 0
Hello thank you very much for your help and time. I made a very stupid mistake. Instead of just adding references, I overwrote the installed-components.txt file with old values.