Hasan Abdullah Hasan Abdullah - 26 days ago 10
Android Question

How to get Firebase notification status (opened or not) which is sent from PHP backend?

When I send any notification from Firebase console, I can monitor my notification status (how many device received or how many opened it) from Firebase console.

Now I developed a PHP backend and using

curl
I can send notification to my users. I need to monitor How many devices are received my notification and how many devices opened it? for each notification.

Is it possible? Please let me know about best practice.
Thank you.

AL. AL.
Answer

For the How many devices are received my notification part, I think you should make use of 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.

For the how many devices opened it part, I think this should be a custom implementation on your client app. For example, if the user does click your notification and open a specific activity of your app, you should then Send an Upstream message, specifying that the notification was opened.