Group Firebase FCM on Android Device

这一生的挚爱 提交于 2019-12-04 07:04:37

问题


I am trying to send cloud messages using the Firebase console. I am doing this for android device.

The push notifications do appear on the device fine along with the data sent with it.

But each notification shows up on its own. Meaning if I send 3 notifications three items show up in the notification bar.

What I want to achieve is that all the notifications to be grouped under one heading. As you have in WhatsApp or Facebook.

How can this be achieved using the Firebase Console?


回答1:


By grouping the notification, do you mean stacking or bundling notifications?

If so, this is actually depends on how you handle notifications in your client app. You simply have to make use of the setGroup() to add all your notifications to a single group then calling notify() to let the NotificationManager of the changes.

This Add Each Notification to a Group documentation pretty much sums it all up.



来源:https://stackoverflow.com/questions/40394210/group-firebase-fcm-on-android-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!