This is really a continuation of another question I posted, except now I'm using Azure's push notification telemetry and Google discontinued FCM diagnostics in the Play Console.
I get reports from users saying they haven't received notifications. But the Azure telemetry shows results like these, even for these notifications:
"GcmOutcomeCounts": {
"Outcome": {
"Name": "Success",
"Count": "1"
}
}
Crashlytics shows no crashes, so the only thing I've come up with is putting calls to a logging API in to see where it fails or stop working, but it never even reaches the app in this case.
There has to be a way of figuring out exactly where and why the notification fails. What is it?
It is possible that the user device didn't get properly configured into the push notifications provider when the app was first installed, reinstalling it might help with resolving such a situation.
Google Cloud Messaging (GCM) was a mobile notification service developed by Google that enables third-party application developers to send notification data or information from developer-run servers to applications that target the Google Android Operating System, as well as applications or extensions developed for the ...
You have all push notifications blocked by default on your browser. You have an extension such as an ad blocker which blocks receiving push notifications. You have reset the settings of the browser, that's why the service worker is removed. You have them blocked by default on your operating system.
In order to fix the issue you can either: Migrate your old GCM project to Firebase, use it in Android Studio and send an updated version of your app to the Play Store. Or stick with the new project and add an additional Authorisation key on Batch's dashboard (in Settings > Push settings).
There has to be a way of figuring out exactly where and why the notification fails. What is it?
Here is my 2 cents. In general, there can be many points of failure for notifications. Your aim would be to figure out which at which point the issue lies. Below is the diagram from the home page of FCM:
Potential failure points:
Handling update of the FCM registration token.
onNewToken()
and sending the new registration
token to server in case its changing.When sending notification from your server to FCM.
When sending it from FCM to user device.
To confirm if there is no issue when sending the notification from your server -> FCM -> user device, you can try getting a delivery receipt from FCM as mentioned here: Receive delivery receipts. It says:
For Android and Chrome client apps, you can get delivery receipts (sent from FCM to your app server) when a device confirms that it received a message sent by FCM.
To enable this feature, the message your app server sends to FCM must include the field delivery_receipt_requested. When this field is set to true, FCM sends a delivery receipt when a device confirms that it received a particular message.
Also, I've seen sometimes issues with firewall on the user's network, back in days when there was GCM. There could be an issue where firewall is blocking the notification. IP range of google GCM push notification server? Try opening the potential list of ports if that's the case or try testing on carrier data network. Since you mention that you've to include log at various points in the app but it never reaches. Looking into the above points can be the next steps.
Handling notification within your app / showing the notification in the notification drawer.
Hope this helps a bit in debugging your issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With