Firebase Cloud Messaging - Check existing or avail

2019-01-15 22:28发布

I've read on Google Firebase Docs:

Client apps can subscribe to any existing topic, or they can create a new topic.

So how can I can check how many existing topics are available for me? Is it only through the console? Or is there an API?

1条回答
【Aperson】
2楼-- · 2019-01-15 22:49

As already mentioned by @FrankvanPuffelen in the comments section, there is not available API to get a list of Topics you have.

What you could do is keep record of the topics you have created on your server side. So it pretty much depends on your own implementation.

Also, if you are thinking of checking the number of subscribers of a specific topic so you can see which ones are active or not, it's also not possible. See this answer by @ArthurThompson:

No. There is no current way to query the number of subscribers to a topic, you would have to maintain the relationship between token and topics on you app server.

查看更多
登录 后发表回答