I have system that has PHP Server side and Android Client side application. Android sends parameters via webservice and PHP handle the GCM side. PHP sends push notification and before sent, it gets all registrationid from DB. The problem is, same device may have two or more registrationid. Because of this, push notification sent to same devices for two or more times. Is there any solution to handle this problem?
GCM can change the registrationId and you have to update it on your server-side.
Look this link at Interpreting a success response section
If message_id is set, check for registration_id: If registration_id is set, replace the original ID with the new value (canonical ID) in your server database. Note that the original ID is not part of the result, so you need to obtain it from the list of registration_ids passed in the request (using the same index).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With