6

How long does it take for a message from Google Cloud Messaging to arrive on a device?

I want to link my door bell with my Android App. The door bell I receive on a RaspberryPi which has an internet connection. I could connect to Google Cloud Messaging, but would the message arrive soon on my Android device?

Saurabh
  • 71,488
  • 40
  • 181
  • 244
Bastiaan
  • 111
  • 2
  • 5
  • 1
    The formula is something like this. heartbeat*datarate*SnR(of carrier). So basically it depends upon the carrier or ISP your using and GCM performance at that time. How much priority it gives to your message. Almost 1-8 seconds. Thats what I have tested. TTL(time to live) in network also varies so there's no guarantee that if your device is off, how long GCM would hold your message. – Fahad Ishaque Feb 09 '13 at 19:31
  • Time has passed since this was asked and an average speed was mentioned in the I/O 2015. You can refer to my answer [here](http://stackoverflow.com/a/37385186/4625829) for more details. – AL. Jun 23 '16 at 07:10

2 Answers2

7

Almost immediately (1-2sec) if phone is active and has stable internet connection. But there is no 100% guarantee. If phone is sleeping it can take time. If you forgot to pay your carrier bills it will never come.

Leonidos
  • 10,482
  • 2
  • 28
  • 37
  • it can take up to 5 mins in my experience - usually instant over wifi but 1-5% of the time it can be slower – Dori Mar 06 '14 at 11:57
1

After months of using in on a production application I've come to notice that it's not so reliable. I've noticed it can take up to 20 minutes to receive a notification. I feel like I was getting much better speed and reliability from sending out an SMS text message.

Yes, it usually comes in a few seconds. But sometimes it can take a while.

capdragon
  • 14,565
  • 24
  • 107
  • 153