I am developing an app using Flutter, and I am implementing push notification using FCM with the firebase_messaging Flutter plug in:
https://pub.dartlang.org/packages/firebase_messaging
on the Readme.md of this plugin, it says when an Android device receives data message while the app has been terminated, the message will be lost, but when the device receives a notification message, the message will show up at the app tray whether the app has been terminated or just in the background.
I have implemented this plugin and it is not behaving the way Readme.md describes. Notification message gets lost on my android device when the app has been terminated.
Here is a sample payload I am sending to the device:
var payload = {
notification: {
title: `message from somebody`,
body: `message text here`,
}
}
What am I possibly doing wrong? Am I missing something in the payload, or is it something else?