0
votes

I successfully integrated my app for receiving push notification using GCM. Its working correctly, I just saw a strange behavior while receiving push notification on one of my android set which is using my wifi network, in the same time others whose are using EDGE or 3G network are receiving notifications correctly. When I try to switch off and switch on the wifi, it receives the pending notification.

I tried opening the ports which normally used by GCM i.e 5228,5229 and 5230 in my router's firewall however with no success.

NB: After seeing this, I tried to configure the app for Parse API and its working as same as GCM so I think it depends upon the network packet receiving or something.

1
I dont think so. Might be some Restriction into your WiFi becoz i already work on this and its working fine in all the NetworksM D

1 Answers

1
votes

I believe, what you're facing is a known issue about TCP connection between GCM servers and your handset is timing out because of inactivity. Network devices (like your Wi-Fi router, your ISP hardware, etc.) between your handset and GCM servers could kill the TCP connection if no packets are sent every now and then.

There are some workarounds for this which you might try. For example, there are apps on Google Play that modify the default Android behavior and make it update this connection more often, increasing chances that it will not timeout. You could try them and see if it fixes the problem for you.