1

I have a GSM PUSH panel and it happens that when user installs the app I record his id to send future notifications.

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.

The problem is that I already have thousands of id's and now it's taking more and more to send.

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:

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

1 Answers1

0

You have to implement it:(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.

  3. The GCM connection server sends the message to the GCM client on the device.
  4. The GCM client on the device receives the message and detects that the client app has been uninstalled; 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.
  6. The GCM connection server marks the registration token for deletion.

7. The app server sends a message to GCM.

8. The GCM returns a NotRegistered error message to the app server.

9. The app server should delete the registration token.

Lam
  • 21
  • 1
  • 3