Are there any limitations for the FCM topics names?

风格不统一 提交于 2019-12-23 11:55:46

问题


I'm trying to find out if there are any limitations for the topic names for FCM. Managed to find info about the number of topics (no limitations), but nothing like length of topic name or allowed characters.


回答1:


Yes, not all characters are allowed, having space between words is not allowed in topic names.

From the docs:

sending messages to a Firebase Cloud Messaging topic is very similar to sending messages to an individual device or to a user group. The app server sets the topic key in the message body with a value like yourTopic. Developers can choose any topic name that matches the regular expression: "[a-zA-Z0-9-_.~%]+"

for more info check this: https://firebase.google.com/docs/cloud-messaging/android/topic-messaging (build request section)



来源:https://stackoverflow.com/questions/48379826/are-there-any-limitations-for-the-fcm-topics-names

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