问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/38678599/can-i-create-subtopics-when-using-firebase-cloud-messaging-for-android