4
I have a GSM PUSH panel and it turns out that when user installs the app I record his id to send future notifications.
But after it uninstalls I continue with his ID saved in the bank and whenever I have my routine run, it sends the push to these users even without having the app installed.
The problem is that I already have thousands of id’s and now it is taking longer and longer to send.
There is the possibility to know who no longer has the app installed and put a flag on the bank so that 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"}]}
If you are using GCM you can get a response to the status of sending the notification. When the notification fails to find a non-existent user (uninstalled app, for example), the error is returned
NotRegistered
. https://developers.google.com/cloud-messaging/gcm#unreg_device. For Apns there is also feedback (return). When the user receives a token is returned.– Daniel Omine
Daniel, thanks for the return, but the GSM returns me the following Jason: {"multicast_id":5157270514039936786,"Success":2,"Failure":1,"canonical_ids":0,"Results":[{"message_id":"0:1474029083357948%0e3f0485f9fd7ecd"},{"error":"Matmischsenderid"},{"message_id":"0:1474029083356778%f17b55e1f9fd7ecd"}]} I have successful and error return.
– William
A question. How are you managing to send push messages if you don’t know the id of users?
– regmoraes
I have all ids saved in my BD, however in return the id is not sent successfully or failed.
– William