i know after posting message google will send back a message ID and it does not mean that the message was already delivered to the device.
is there anyway to receive delivery reports of sent notifications in FCM?
i know after posting message google will send back a message ID and it does not mean that the message was already delivered to the device.
is there anyway to receive delivery reports of sent notifications in FCM?
Yes, the message_id
only identifies that the message was successfully delivered to the FCM servers.
December 17, 2019 - FCM Update
FCM has removed ongoing support for delivery reciepts via the XMPP protocol. In place of XMPP delivery receipts, developers should enable delivery data export in the FCM client SDK.
What I think you're looking for is Delivery Receipts:
Delivery Receipt: If the app server included
delivery_receipt_requested
in the downstream message, the XMPP connection server sends a delivery receipt when it receives confirmation that the device received the message.
Method projects.androidApps.deliveryData.list
reads:
List aggregate delivery data for the given Android application.
It needs a parent
node projects/{project_id}/androidApps/{appId}
passed and then returns:
{
"androidDeliveryData": [
{
"appId": "",
"date": {
"year": 2021,
"month": 12,
"day": 19
},
"data": { ... }
}, ...
}
The term "aggregate" rules out individual message delivery reports,
but daily aggregated stats are still better than no stats at all:
{
"delivered": number,
"pending": number,
"droppedTooManyPendingMessages": number,
"droppedAppForceStopped": number,
"droppedDeviceInactive": number
}
{
"deliveredNoDelay": number,
"delayedDeviceOffline": number,
"delayedDeviceDoze": number,
"delayedMessageThrottled": number,
"delayedUserStopped": number
}
{
"priorityLowered": number
}
Those categories are just the same, as one gets posted eg. as Push Kit notification receipt.
The SMS standard would also offer message receipts - because these are
individual messages - and not batches of 500 pub/sub subscribers each.
While this also isn't guaranteed, because one can disable these replies.