I have implemented chat in my project and using GCM for it.In this i have came across the strange issue.
I have do following steps for it.
- Send chat message to server.
- Server fetches reg key of device and send push message to GCM server.
- Now on other device in which i am receiving push message i tried waiting for the push message for a long time.
But i did not receive the push message.
- Now when i turn my wifi off and on it again or switch from 3g to wifi or vice-versa, i get all push messages at once.
I have read GCM docs and i also have seen these two questions in Stackoverflow.
- Google Cloud Messaging - messages sometimes not received until network state changed
- Device stops receiving GCM pushes until network is switched
I have also referred a google groups question regarding this issue
Problem in getting messages on device using GCM.
But i didn't get any solution till now.
I am using Asp.net at the server side. Any help or suggestion is appreciated.