Skip to content Skip to sidebar Skip to footer

Do Not Receive Gcm Message While Android Device Being Connected To Wifi

Background I am working on an Android app which uses Google Cloud Messaging (new GCM-API, not deprecated C2DM) for sending send-to-sync messages to all registered devices. Since I

Solution 1:

You need to open ports 5228 - 5230 to make GCM work properly.

Check the following:

Note: If your organization has a firewall that restricts the traffic to or from the Internet, you'll need to configure it to allow connectivity with GCM. The ports to open are: 5228, 5229, and 5230. GCM typically only uses 5228, but it sometimes uses 5229 and 5230. GCM doesn't provide specific IPs. It changes IPs frequently. We recommend against using ACLs but if you must use them, take a broad approach such as the method suggested in this support link.

If your Company Wifi does not allow these ports then you will not be able to receive GCM.

Hope it helps

Solution 2:

If the service worked for you at some time your device "registration id" could be changed or simply wrong.

If never worked for you and after checking that your device registration id is the same that you're sending in the request payload to Google, check your Broadcast Receiver and the GCM intent service that wake up your device, because if this implementation is failing on your app you'll be not receiving any message even if your request is received ok by Google as you're are pointing.

Solution 3:

Deprecated GCM-version

Meanwhile this "new" GCM-API is deprecated either! I am using the latest GCM-API (published in summer 2015) now. Since upgrading I have never faced this issue again. The new API, including InstanceId-API is very recommendable from my point of view, as far as I see it is a more stable than the previous GCM-API.

Post a Comment for "Do Not Receive Gcm Message While Android Device Being Connected To Wifi"