Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Messaging without working data connectivity

Can Google Cloud Messaging deliver a notification with "zero-byte payload" to a phone that's capable of receiving voice calls and SMS, but for whatever reason has no working data connectivity at the moment?

By "zero byte", I mean that the phone would be aware that a GCM notification having no payload was sent to it by a specific sender, and could fire off an intent to that effect.

Real-world example: A burglar alarm gets triggered, and sends two push messages to the homeowner -- a zero-byte message whose meaning is implied entirely from the fact that it was sent at all, implies "something bad is happening", and can (presumably) be delivered even when data connectivity is blocked or unavailable because it (presumably) rides over the same transport layer used for SMS, and a longer push notification sent a few seconds later with additional meta-information about the situation that might only work if there's working data connectivity at the moment (so the phone could be notified, and fetch the payload from a server after establishing a conventional data session).

I've read Google's docs, but it seems like they've intentionally bent over backwards to say nothing about GCM's physical transport layer.

like image 543
Bitbang3r Avatar asked Nov 04 '22 04:11

Bitbang3r


1 Answers

I would have to say "No" on that, since GCM (and pretty much everything Google does) is TCP/UDP/IP-based, there's no way it can get delivered to your phone if your phone doesn't have an active data (3G/4G/WiFi) connection.

Since the phone wouldn't have an IP-address, GCM couldn't deliver the message.

From GCM Architectural Overview:

  • It uses an existing connection for Google services.
like image 194
kaderud Avatar answered Nov 09 '22 09:11

kaderud