Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCM stop working after some time

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?

like image 505
user2163780 Avatar asked Dec 04 '13 11:12

user2163780


People also ask

When was GCM deprecated?

The GCM server and client APIs were removed on May 29, 2019, and currently any calls to those APIs can be expected to fail. Google Cloud Messaging, deprecated April 10 2018, has been deactivated and removed from Google's APIs.

Is GCM deprecated?

The GCM server and client APIs will be removed on May 29, 2019. GCM will be replaced by Firebase Cloud Messaging (FCM), which will inherit the reliable and scalable GCM infrastructure, plus many new features.

What is GCM and how it works?

GCM stands for Google Cloud Messaging. Every push notification receive on any Android device is sent by the GCM only. when sender sends an push notification then it goes to GCM. GCM receives that push and forward it to particular Android Device by its Unique device id.

What is GCM service on Android?

Google Cloud Messaging (GCM) is a service that allows you to send push notifications from your server to your users' Android devices, and also to receive messages from devices on the same connection.


1 Answers

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.

like image 132
braren Avatar answered Sep 22 '22 15:09

braren