Firebase Expandable Notification Show image when app is in background

前端 未结 12 2085
深忆病人
深忆病人 2020-12-23 14:19

I am implementing FCM notifications in Android, but how does notifications differ depending on the app status (background vs. foreground)?

12条回答
  •  无人及你
    2020-12-23 14:44

    'Data' key needs to be there in Push Notification bundle.

    In addition to above answers, If you are testing push notifications using FCM console, 'data' key and object is not added to Push Notification bundle. So you will not receive detailed push notification when App is background or killed.

    In this case you have to opt for your back end admin console to test App background scenario.

    Here, you will have added 'data' key to your push bundle. so, detailed push will be shown as expected. Hope this helps few.

提交回复
热议问题