9 Ekim 2012 Salı

Dude - Where is my C2DM?

To contact us Click HERE
So a project we're working on at Technoracle requires push notifications.  For iOS builds we are using Apple's APNS, which is very secure and reliable.  I had an issue with C2DM and went to the Google Developer website and was blind sided by this message:



Important: C2DM has been officially deprecated as of June 26, 2012. This means that C2DM has stopped accepting new users and quota requests. No new features will be added to C2DM. However, apps using C2DM will continue to work. Existing C2DM developers are encouraged to migrate to the new version of C2DM, called Google Cloud Messaging for Android (GCM). See the C2DM-to-GCM Migration document for more information. Developers must use GCM for new development.
Dang!  For the uninitiated, C2DM is Cloud to Device Messaging.  Those little red notifications you see on your phone letting you know that you have actionable items to look at works by a small daemon running in the background at all times, waiting for messages.  The messages are composed of several logical parts but the basic message contains a section describing the application destination, then another about the message.
C2DM vs GCM?
So what is GCM and why is it better?  Google Cloud Messaging is built from the lessons learned from C2DM, or so it appears to us.  Like C2DM, it's main purpose is to transfer messages to Android powered devices to let them know there is a message on a server waiting for them to do something with.  C2DM was very lightweight and easy to implement.  GCM offers some improved options.  From the google GCM website:
"a lightweight message telling the Android application that there is new data to be fetched from the server (for instance, a movie uploaded by a friend), or it could be a message containing up to 4kb of payload data (so apps like instant messaging can consume the message directly). The GCM service handles all aspects of queueing of messages and delivery to the target Android application running on the target device."
We are excited to try it and look forward to this improvement.
More reading:
To learn more about GCM, you can join the android-gcm group and read the following documents: 

Getting Started  Read this document to learn the basic steps involved in developing Android applications based on GCM.

Architectural OverviewRead this document for a description of the underlying concepts and architecture in GCM.

Demo App TutorialRead this document to walk through setting up and running the GCM demo app.

Advanced TopicsRead this document to get a more in-depth understanding of key GCM features.

MigrationRead this document if you are a C2DM developer moving to GCM.

GCM also provides helper libraries for client and server development.

Hiç yorum yok:

Yorum Gönder