Thursday, 19 May 2016

Google Android GCM delay.

GCM instant notification is not guaranteed:

GCM will usually deliver messages immediately after they are sent. However, this might not always be possible.

The GCM framework part on the client phone use a TCP connection on the port 5228. This connection its used for push notifications, but this connection can go timeout (tcp idle timeout). Some wifi routers kills inactive connections after x minutes.

The GCM framework uses a keep-alive mechanism to keep the connection a live by sending an heartbeat. This heartbeat is 15 minutes on wifi and 28 minutes on cellular network(3G). However these numbers may be changed when the phone is in other conditions such as low battery (battery saver model will change it).....
We can change the heartbeat interval, but it is not suggested, and it requests "supper user" permissions.

No comments:

Post a comment