I need help understanding Firebase Cloud Messaging.
Context: There is backend, android app and ios app. Some event happens on backend, and I send push notification to the user. There is a need to detect if user received this notification, or something went wrong and we need to send it through other channels (sms, email, etc). Is there a way to achieve this?
My initial idea is to send some message_id in message.data, so app handles message and sends api request to backend, confirming that message is received. But will it work if user won’t open the app? From what I understand, application can handle data payload only after user opens notification. And we’re planning on sending info notifications, that user will most likely just see and dismiss.
Backend is written in PHP, and uses Firebase REST Api to send notifications. There is seems to be a message_id in response ("projects/{project_id}/messages/0:1717154779703741%46b91c6f46b91c6f"
), but I haven’t found in docs whether I can use it for something or not.
Perhaps, Admin SDK will better suit my needs? Thanks in advance for any ideas and shared experience.