FCM is not delivering push to client using HTTP v1 - firebase

Does anyone facing issue with fcm to delivery push notification with HTTP v1?
I've an scenario in which I'm having strange issue. When I'm running an debug build or release build in my mobile, I'm able to receive push notification in device with high priority but when I'm sending push notification to those users who have downloaded same build from play store, they're not receiving push notification on device side.
While I'm not getting any error response from fcm service https://fcm.googleapis.com/.../projects/messages:send when sending push notification to client who have downloaded from play store. While using same API, it's delivering push to client's device who've installed direct .apk file.
Can anyone have an idea or might have faced similar issue in past?

Related

Issue with Firebase Cloud Messaging

Hello stack overflow community, I'm using the cross- platform FCM (Firebase Cloud Messaging) to send push notifications from my server developed with spring-boot java to my application developed with android studio java. I have an issue which is sometimes I send the push notification from the server and everything is fine (the response i get indicates that the push notification has been sent) but I don't receive it on my mobile app.
I should resend it many times to receive the last notification I sent. And sometimes I must wait almost 15 minutes to receive one notification. I want to know if the problem is with my code or in the server of firebase.

Firebase Cloud Messaging - Identify delivery status for a particular push notification message

Is it possible to identify whether a particular push notification message was delivered to a particular token via Firebase Cloud Messaging? And, if so, is it possible to do so via an API call or by listening to some callback?
I know that I can look at aggregate statistics in the console and even segment those statistics through analytics tags, but cannot find a way to get more discrete information.
I also know that the API will synchronously respond if a token is invalid but the process by which Apple and Google invalidate tokens is a bit opaque (to me) and doesn't help if someone simply turned off push notifications for my app.
Thanks!
Jason
If someone turned off push notification – you can check it with code
Swift ios check if remote push notifications are enabled in ios9 and ios10
Android app - detect if app push notification is off
But user can be offline, or APNs / Firebase service – can get some problems and your notification will be drop. You can check delivery status with some code in iOS and Android applications.
If you need check, delivery status for some push you can make push notification extension (in iOS). For send status about delivered notification in your API. More info about push notification extension.
https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension
It can be helpful
https://developer.apple.com/documentation/usernotifications
https://developer.apple.com/documentation/usernotifications/modifying_content_in_newly_delivered_notifications
https://firebase.google.com/docs/cloud-messaging/understand-delivery
https://firebase.google.com/docs/cloud-messaging/android/receive#handling_messages About handling messages in Android (you can send status delivered too)
I hope this answer will help with your problem.
UPD:
https://firebase.google.com/docs/cloud-messaging/understand-delivery
Received (available only on Android devices) — The data message or
notification message has been received by the app. This data is
available when the receiving Android device has FCM SDK 18.0.1 or
higher installed.

How to Test FCM Data Push Notifications Delivery?

I have an Azure Web Service which is using an Azure Notification Hub to push data notifications using FCM via Firebase to a Xamarin Android App. Initially the app is getting a token which is posted to the web service. The web service then sends it with the data to the notification hub which is sending it to Firebase. The response back from the hub is indicating a successful transfer it seems from the notification properties and the ReqID property. But the notification is not reaching the app. Is there a way to see individual notifications' status on the Firebase site? Currently I don't see anything under the "Cloud" report for Data.
[
Thanks for asking question! One of the notification failure point could be when sending it from FCM to user device. To confirm this, you may try getting a delivery receipt from FCM.
You may refer to this article Receive delivery receipts. It says for Android and Chrome client apps, you can get delivery receipts which can be sent from FCM to your app server. 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 check for firewall on the user's network.

Many errors sending push notification with the Apigee console

We have an iOS app which is able to receive push notification through the Apigee SDK.
The push notifications are sent by using the Apigee admin console.
Within the console, we configured both dev and prod environments. The prod environment is used for the app published in the App Store. In both cases, the push notifications are well received by our iPhone devices.
However, my question is about the status displayed in the Message History section of the Apigee console.
In the case of the dev notifier, the console display the message : Finished (with errors) with by example, a total sent of 660 for a total errors of 1318.
I don't well understand these figures and I don't know where they are documented.
Is the total sent figure for the number of devices to which the push is sent? However, we don't have as many devices with the dev app version installed
The devices we have with the dev app version installed have well received the push as expected so why are there as many errors?
The detail of the error message is: "INVALID_TOKEN: Failed sending notification."
Thanks very much for your help
We have a bug where statistics get calculated inaccurately if you have errors from the Apns service since they come back asynchronously.
Invalid Token usually means the device is not registered with the apple push notifications service anymore.

Sometimes DeviceSubscriptionExpired event is firing on not expired device ids.#PushSharp

I am sending Push notification messages from my asp.net web site to Android and iPhone.I am using push-sharp version is 2.1.2.0-beta lib.I can send push notification messages successfully and having status log for each message along with there Device ID.
I found more that 100 device which was having DeviceSubscriptionExpired(PushSharp Event). I check those devices on my database, i found those same device id was successfully on the same day.I am suspecting that those devices are not expired but DeviceSubscriptionExpired event is fired for some reason or apple and google server responding with Subcription expired.
I can't figure it out why it is happening. Can anyone please suggest?
Note: My apps are designed such a way that it will request device id on each application start and update the latest device id if it is changed.
Maybe you are using a developer certificate, you should check you are using the production if you are sending push to production apps.

Resources