在Android设备上将Firebase FCM分组 [英] Group Firebase FCM on Android Device

本文介绍了在Android设备上将Firebase FCM分组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Firebase控制台发送云端邮件。我正在做这个android设备。



推送通知确实与设备上的数据一起出现在设备上。



但是每个通知出现在自己的。这意味着如果我发送3个通知三个项目显示在通知栏中。



我想要实现的是将所有通知分组在一个标题下。正如您在WhatsApp或Facebook中所看到的那样。

使用Firebase控制台可以实现这一目标吗?

解决方式 通过分组通知,你的意思是堆叠捆绑通知

如果是这样,这实际上取决于你处理您的客户端应用程序中的你只需要使用 setGroup()将所有通知添加到一个组,然后调用 notify()让NotificationManager发生变化。

这个将每个通知添加到组几乎总结都起来了

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?

解决方案

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.

这篇关于在Android设备上将Firebase FCM分组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆