I am developing an app in React native, want to show Image in push notification when the app is in background or killed. When the app is in foreground it is doing fine but in ba
If your payload contains a notification
key, your app will handle push messages itself only if your app is active/in the foreground as they are delivered to your onMessageReceived
handler. Otherwise (so it's in the background, or killed), FCM handles showing the notification for you by using the values you put into the notification key payload.
If your payload contains only a data
key, your app will handle all push messages itself. They are all delivered to your onMessageReceived
handler.
See this reference: https://stackoverflow.com/a/37876727/3037523