What is the best way to send FCM using SDK 34 (Android 14 Devices) with FCM v1 and get the messages delivered.
0. BACKGROUND AND TESTS
Since the push for SDK 34 usage from Google, and the Firebase v1 coming into inception, I have been having issues with sending of notifications.
Thanks to @Erels for updating the example and B4J Sending tool found here https://www.b4x.com/android/forum/threads/b4x-firebase-push-notifications-2023.148715/
1. ISSUE
When I change the example project to use SDK 34, the notifications do not come. It can be replicated easily. Change the example project to SDK 34, install the app FRESH (using new package name, or remove the old app and reinstall), and allow the notifications permission.
Next with your B4J Sending tool properly configured to V1, try sending message.
2. I received this message also from Play Console Crash/ANR Section
I checked the forum for Missing Foreground service type and came accross this thread https://www.b4x.com/android/forum/t...-google-play-crash-report.163821/post-1004700 and when I add this line to the manifest using SDK 34, the messages started coming
But then, if you upload your BUILD with this manifest code, Play Console will prompt you to make a DECLARATION about purpose of the foreground service and a mandatory video url to demonstrate how the messaging works.
0. BACKGROUND AND TESTS
Since the push for SDK 34 usage from Google, and the Firebase v1 coming into inception, I have been having issues with sending of notifications.
Thanks to @Erels for updating the example and B4J Sending tool found here https://www.b4x.com/android/forum/threads/b4x-firebase-push-notifications-2023.148715/
1. ISSUE
When I change the example project to use SDK 34, the notifications do not come. It can be replicated easily. Change the example project to SDK 34, install the app FRESH (using new package name, or remove the old app and reinstall), and allow the notifications permission.
Next with your B4J Sending tool properly configured to V1, try sending message.
2. I received this message also from Play Console Crash/ANR Section
Missing foreground service type
From Android 14, developers must specify service types when foreground services are found in their app's manifest. A version of your app that is currently in production is crashing because it tries to start a foreground service when no foreground service type is declared. Make sure service types for the services that start in the foreground are specified in your app's manifest
I checked the forum for Missing Foreground service type and came accross this thread https://www.b4x.com/android/forum/t...-google-play-crash-report.163821/post-1004700 and when I add this line to the manifest using SDK 34, the messages started coming
B4X:
AddPermission(android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING)
SetReceiverAttribute(FirebaseMessaging, android:foregroundServiceType, "remoteMessaging")
But then, if you upload your BUILD with this manifest code, Play Console will prompt you to make a DECLARATION about purpose of the foreground service and a mandatory video url to demonstrate how the messaging works.