Android Gcm Messages Repeated
I am working on a chat application and trying to use Google cloud messaging following this tutorial: http://hmkcode.com/android-google-cloud-messaging-tutorial/ It works fine bu
Solution 1:
Please check the following official GCM thread, which defines that there is some bug from Google side.
https://groups.google.com/forum/#!topic/android-gcm/EHZUTEJMeyw
For now as a solution, what you can do is that along with the GCM response from server, pass some random unique ID and handle the GCM message only if ID is unique, as this id also would be duplicated id that GCM message is duplicated.
Solution 2:
Not eligible to comment so has to post this in an answer. Its good that you are trying to use GCM server instead having your own server do the work. But if you have time, check out the socket.io library for android. You would need to understand node.js for that too. Just a suggestion for making a better app.
Post a Comment for "Android Gcm Messages Repeated"