简体   繁体   English

不要将推送发送给不再拥有该应用的用户?

[英]Do not send push to users who no longer have the app?

I have a GSM PUSH panel and it happens that when user installs the app I record his id to send future notifications. 我有一个GSM PUSH面板,当用户安装应用程序时,我会记录他的ID以发送未来的通知。

But after it uninstalls I continue with the ID of it saved in the database and whenever I run my routine, it sends the push to those users even without having the app installed. 但是在卸载之后我继续保存在数据库中的ID,每当我运行我的例程时,即使没有安装应用程序,它也会向这些用户发送推送。

The problem is that I already have thousands of id's and now it's taking more and more to send. 问题是我已经有成千上万的id,现在它正在发送越来越多。

Is it possible to know who does not have the app installed anymore and put a flag in the database so it is no longer sent? 是否有可能知道谁没有安装该应用程序,并在数据库中放置一个标志,以便不再发送?

Example of JSon return: JSon返回的示例:

{"multicast_id":5157270514039936452,"success":2,"failure":1,"canonical_ids":0,"results":[{"message_id":"0:1474029083357948%0e3f0485f9fd7acv"},{"error":"MismatchSenderId"},{"message_id":"0:1474029083356778%f17b55e1f9fd7erf"}]}

You have to implement it:( https://developers.google.com/cloud-messaging/registration ) 你必须实现它:( https://developers.google.com/cloud-messaging/registration

  1. The end user uninstalls the client app. 最终用户卸载客户端应用程序。

  2. The app server sends a message to GCM connection server. 应用服务器向GCM连接服务器发送消息。

  3. The GCM connection server sends the message to the GCM client on the device. GCM连接服务器将消息发送到设备上的GCM客户端。
  4. The GCM client on the device receives the message and detects that the client app has been uninstalled; 设备上的GCM客户端接收消息并检测到客户端应用程序已卸载; the detection details depend on the platform on which the client app is running. 检测详细信息取决于运行客户端应用程序的平台。
  5. The GCM client on the device informs the GCM connection server that the client app was uninstalled. 设备上的GCM客户端通知GCM连接服务器已卸载客户端应用程序。
  6. The GCM connection server marks the registration token for deletion. GCM连接服务器将注册令牌标记为删除。

7. The app server sends a message to GCM. 7.应用服务器向GCM发送消息。

8. The GCM returns a NotRegistered error message to the app server. 8. GCM向应用服务器返回NotRegistered错误消息。

9. The app server should delete the registration token. 9.应用服务器应删除注册令牌。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM