问题
I'm using GCM service in my app. It is working fine, however some time it stops receiving GCM notifications. I have to restart the device. Is there any way to avoid this?
回答1:
This a known problem with some wifi routers and mobile carriers, it's basically a tcp timeout problem and actually solution is implement a heartbeat service that send to clients every 5 mins.
This a opened issue to google here: https://productforums.google.com/forum/#!category-topic/nexus/connecting-to-networks-and-devices/fslYqYrULto They agree there is currently an issue.
来源:https://stackoverflow.com/questions/20373551/gcm-stop-working-after-some-time