我将注册ID(gcmId)放在正确的位置吗?我似乎一直在收到: $ b $ {code $ {multicast_id:9098772304322316557,success:0,failure:1,canonical_ids :0,results:[{error:NotRegistered}]}
开始认为这是后端问题。 nofollow>官方文档 ...
如果它是NotRegistered,您应该从服务器数据库中删除注册ID因为应用程序是从设备上卸载的,或者客户端应用程序未配置为接收消息。
正确回答您的问题。
这里列出 GCM中的所有可能的错误代码,它再次表明以下关于 NotRegistered错误。
现有的注册令牌可能会在多种情况下停止有效,包括:
Am I placing my registration id (gcmId) in the correct place? I seem to always be receiving:
{"multicast_id":9098772304322316557,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"NotRegistered"}]}
Starting to think it's a backend problem.
解决方案Quoting the official docs...
If it is NotRegistered, you should remove the registration ID from your server database because the application was uninstalled from the device, or the client app isn't configured to receive messages.
That appropriately answers your question.
Here the list of all possible error codein GCM which again says the following about NotRegistered error.
An existing registration token may cease to be valid in a number of scenarios, including:
- If the client app unregisters with GCM. If the client app is automatically unregistered, which can happen if the user uninstalls the application. For example, on iOS, if the APNS Feedback Service reported the APNS token as invalid.
- If the registration token expires (for example, Google might decide to refresh registration tokens, or the APNS token has expired for iOS devices).
- If the client app is updated but the new version is not configured to receive messages. For all these cases, remove this registration token from the app server and stop using it to send messages.
更多推荐
对GCM服务器的HTTP Post请求总是返回“NotRegistered”
发布评论