
Android Cloud to Device Messaging is a technology that allows devices to receive notifications and updates from the cloud. This means that your Android device can receive messages and data from the internet, even when it's not connected to a network.
The Google Cloud Messaging (GCM) service is a key part of Android Cloud to Device Messaging. GCM allows developers to send messages to Android devices, and it's free to use. This service has been replaced by Firebase Cloud Messaging (FCM), which offers similar functionality.
Android devices can receive messages and updates from the cloud, even when they're offline. This is made possible by the use of a messaging service that stores messages locally on the device.
If this caught your attention, see: Iphone X S Dual Sim
What is C2DM
C2DM, or Cloud to Device Messaging, is a service introduced in Android 2.2 "Froyo" to send small amounts of data to an Android phone.
It works by having the application register with the service, and then having a remote server send a message to the c2dm Google API, which is then forwarded to the device.
Here's an interesting read: Text Messages Failing to Send Android

Signing up for c2dm is required with the account used to send the messages, and this process is crucial for sending messages successfully.
The onRegistered method is called when registration with the c2dm service is successful, and it's a good opportunity to log the registration key.
The registration key is usually sent to a server, but for now, it's enough to log the key.
Curious to learn more? Check out: What Is G E O S M I N
Development
GCM first launched as Google's Android Cloud to Device Messaging (C2DM) service, first featured in Android 2.2 by Google.
The transition to Google Cloud Messaging was announced on June 27, 2012, at Google I/O, requiring SDK and code changes, as well as a release of an application update to the publish repository.
Migrating to the service required a release of an application update to the publish repository (such as Google Play) for downloading and updating.
Google published documentation to guide application developers with migrating from the C2DM and onto the new service.
At I/O 2013, Google announced the Chrome service before the conference, in a blog post titled 'Building efficient apps and extensions with push messaging.'
A new SDK was announced at I/O 2015, alongside iOS support.
For another approach, see: E L E C T R O
Cloud Messaging
Cloud Messaging is a free mobile service that enables third party app developers to send messages between servers and client apps. It allows for versatile messaging targets, enabling the distribution of messages to a client app in any of three ways – to single devices, to groups of devices, or to devices subscribed to topics.
Google Cloud Messaging (GCM) is a service that was announced as a successor to Android Cloud to Device Messaging (C2DM) service. The newest version of GCM is Firebase Cloud Messaging (FCM), which is strongly recommended to upgrade to for new features and functionality.
GCM allows for both downstream and upstream messaging, enabling a reliable and battery-efficient connection between server and devices. Downstream messaging can be used for purposes such as alerting users, chat messaging or starting background processing before a user opens the client app.
You can reach over a billion devices with this free cloud messaging service, according to Google. The GCM service was first featured in Android 2.2.
FCM inherited GCM’s core infrastructure, with new SDKs to make cloud messaging development easier. Upgrading to FCM SDK promises simpler client development, with the need to write your own registration or subscription retry logic no longer required.
For your interest: BlackBerry Storm 2
Technical Details
Android Cloud to Device Messaging is a powerful tool that allows developers to send messages and data to devices. This is done through a registration process that provides a unique identifier for each device.
The registration process involves sending a C2DM Registration ID or a GCM Registration ID, which is a randomly-generated identifier that doesn't contain any personal or device information. This ID is stored on the device and sent to the developer's application server.
Upon registration, the device receives a unique identifier that the developer later uses to send notifications. This identifier is used to identify the device that the data or message request is intended for.
GCM has the ability to send push notifications, deep-linking commands, and application data. Larger messages can be sent with up to 4 KB of payload data.
The GCM Service receives and acknowledges the request and responds by giving the device a GCM Registration ID. The identifier is stored onto the device, and is typically sent to the developer's application server to be stored.
Consider reading: Medical Id App
Here are the key differences between C2DM and GCM:
- C2DM uses a C2DM Registration ID, while GCM uses a GCM Registration ID.
- C2DM sends a data or push request, while GCM sends a registration API request.
The GCM Authentication Service verifies the GCM Registration ID and other credentials before sending the notification event to the device. This ensures that only authorized devices receive notifications.
Featured Images: pexels.com


