0

I am already obtaining successfully the Firebase Cloud Messaging (FCM) device token by using FirebaseInstanceId.getInstance().getToken(). I used the following code to subscribe the client app to a topic:

String topic = "toronto";                                 
FirebaseMessaging.getInstance().subscribeToTopic(topic);

I assume everything is correct but in order to confirm, I would like to have a Graphical User Interface (GUI) provided by FCM to manage, monitor and see all of the devices that are subscribed to specific topics. With the code I used, I would expect to see the topic "toronto", and at least one device subscribed to that topic, for example by showing the FCM device token.

I was reading at https://developers.google.com/instance-id/reference/server#get_information_about_app_instances how it is possible to get information about app instances to find out details about a client app instance's subscriptions, including each topic name and subscribe date, but does FCM provide a GUI to see that?

UPDATE 1:

I was able to subscribe devices to topics and unsubscribe devices from topics. But when I want to confirm/monitor that a device was subscribed successfully, I am using this for example (for privacy I changed values of keys and tokens):

C:\curl>curl -X GET -k --header "Authorization: key=[My key]" "https://iid.googleapis.com/iid/info/[My device token]?details=true"
{"applicationVersion":"22","connectDate":"2017-12-05","attestStatus":"NOT_ROOTED","application":"com.[My app]","scope":"*","authorizedEntity":"[My app ID]","rel":{"topics":{"San-salvador":{"addDate":"2017-12-05"}}},"connectionType":"WIFI","appSigner":"[My signature]","platform":"ANDROID"}
C:\curl>

I was expecting Firebase Cloud Messaging to provide a Graphical User Interface with a dashboard, charts and reports to see the topics that have been created and the list and number of devices subscribed to each of the topics, something similar to the Google Analytics reports, maybe even with maps to see where devices are subscribing from or anything visual that can help to visualize and monitor topic subscriptions. Instead, I am having to do everything with cURL with code similar to what I am showing in this UPDATE 1. I am surprised Firebase Cloud Messaging does not provide a GUI, since the tool comes from Google and they could easily provide a dashboard or something similar to Google Analytics.

4

1 回答 1

1

FCM 当前没有显示您拥有的主题列表/计数或主题拥有的订阅者(计数/注册令牌)的 GUI。

最多,您可以使用Instance ID API(您的帖子中的那个)来检查一个注册令牌,它订阅了哪些主题。但是,请注意,Instance ID API 旨在用于您的服务器端。

除此之外,您必须使用主题(订阅了哪些令牌)实现自己的映射。

有点类似/可能有用的帖子:

于 2017-12-05T18:43:32.927 回答