如何从未使用的服务器中删除gcm id [英] How to remove gcm id from server which is not used

查看:97
本文介绍了如何从未使用的服务器中删除gcm id的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的应用程序使用GCM。每件事情都很好。如果有一种情况清除缓存并安装相同的应用程序,它将生成新的唯一GCM ID,我将它发送到服务器,并且我的问题是我如何删除旧的GCM id.I想从我的服务器中删除旧的未使用的GCM ID,因为当我想将通知发送到多个设备这个未使用的ID也包括在内。我遇到pubSub.unsubscribe,但它是为主题。任何人都可以告诉我如何删除旧的GCM ID

I am using GCM for my app.Every thing is working fine.If there is a situation clear the cache and install the same application,It will generate the new unique GCM id and I will send it to sever, and my question is how can i remove the old GCM id.I want to remove old unused GCM ID from my server because when i want send the notification to multiple devices this unused id is also included.I came across the pubSub.unsubscribe,But it is for topics. Can any one tell me how can i remove old GCM id

推荐答案

当您的服务器尝试使用无效令牌发送消息时应该得到如此表示的回应。此时,您应该可以从服务器中删除无效令牌。

When your server tries to send a message using the invalid token you should get a response that indicates as such. At that point you should be able to delete the invalid token from your server.

这篇关于如何从未使用的服务器中删除gcm id的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆