Image not showing in push notification when app is in background or killed?

后端 未结 1 1027
滥情空心
滥情空心 2021-01-23 18:03

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

相关标签:
1条回答
  • 2021-01-23 18:45

    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

    0 讨论(0)
提交回复
热议问题