How to know wether we have already subscriped to a topic in Firebase Cloud Messaging?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can get token
String token = FirebaseInstanceID.getToken();
Log.d(TAG,token);
and do a Get to https://iid.googleapis.com/iid/info/token
If using curl
curl -X Get -H"Authorization:key=serverAPIkey" "https://iid.googleapis.com/iid/info/token?details=true"
to see all of the device's subscribed topics
Find out details about a client app instance's subscriptions, including each topic name and subscribe date. See get information about app instances