使用Firebase云消息传递(适用于Android)时是否可以创建子主题? [英] Can I create subtopics when using Firebase Cloud Messaging (for Android)?

查看:147
本文介绍了使用Firebase云消息传递(适用于Android)时是否可以创建子主题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一款使用新的Firebase云端邮件系统的应用程序。现在我看到FCM的主题特征。

我创建了一个主题news,并希望添加news / weather或news / politics等子主题。



总共有20个子主题。



这对FCM来说甚至是可能的吗? / p>

解决方案

我通常用前缀和子主题开始我的主题,用 _ 。所以,如果我有一个每个用户的子主题(非常适合发送用户到用户的消息),我最终得到了:



  / topics / users_puf 
/ topics / users_forj9

可能有更好的办法,所以我希望别人也会回答。

I'm currently developing an app that uses the new firebase cloud messaging system. Now I see the topic feature of FCM.

I created a topic "news" and want to add sub topics e.g "news/weather" or "news/politics".

Altogether there are about 20 subtopics.

Is this even possible with FCM and is this god practice?

解决方案

I usually start my topics with a prefix and then the subtopic, separating them with a _.

So if I have a sub-topic per user (great for sending user-to-user messages) I end up with:

/topics/users_puf
/topics/users_forj9

There might be better ways, so I hope others will answer too.

这篇关于使用Firebase云消息传递(适用于Android)时是否可以创建子主题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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