问题描述
最近我从GCM迁移到FCM通过我的应用程序发送通知,我想知道是否能够从我的应用程序服务器订阅特定主题的成员。如果可能的话,那么如何才能找出一个特定的成员令牌是否有效或过期。因为在我的数据库中,我已经接近22L人GCM注册的TOKEN ID,所以我将创建一个主题,并通过我的应用程序服务器订阅这些成员。
任何想法来解决这种问题。
您可以使用,特别是使用 batchAdd
。它也可以通过返回一个 NOT_FOUND
错误来识别你注册的令牌是否是无效的。从文档:
Recently I migrated from GCM to FCM for sending the notification via my app, i want to know whether can able to subscribe the members in particular topic from my app server. If possible, then how will find out if a particular member token valid or expired.
Because in my database, i have near to 22L people GCM Registration TOKEN id, so that i will create one topic and subscribe those members via my app server.
Any ideas to resolve this kind of issues.
You can subscribe multiple tokens to Topic via your App Server using the Instance ID API, specifically, using batchAdd
. It can also identify if the Registration Token that you were subscribing is invalid by returning a NOT_FOUND
error. From the docs:
这篇关于在APP服务器中创建FCM主题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!