I am implementing FCM notifications in Android, but how does notifications differ depending on the app status (background vs. foreground)?
Messages, that contain both notification and data payload (like your example sent with Postman) are automatically displayed to end-user devices by the FCM library. And this does not include (big) images.
I guess there are two possibilities for you:
Try what Rashmi Jain suggested. However, this solution could work right now and stop working tomorrow, if the Firebase library is updated (and thus the implementation of the message handling)
Send a data message with Postman. You may not fill the notification object in the JSON therefore, so it could look something like this:
{
"message": {
"token":"bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1...",
"data":{
"title" : "Awesome title",
"body" : "Your awesome push notification body",
"image" : "your_image_url"
}
}
}
I would prefer the 2nd option. Good luck!