1

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

jdimmerman
  • 124
  • 4
  • 15

1 Answers1

5

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.

Eysner
  • 584
  • 4
  • 15
  • Thanks @Eysner. So, in other words, is there no way to check for status using the firebase API and the only way to do so is to use my app to notify my backend directly? – jdimmerman Jun 22 '20 at 20:45
  • @jdimmerman you can use firebase API for it only on Android. If you need information about all platforms you should use other API. – Eysner Jun 23 '20 at 07:55