Free Trial
|

Android: Messages from the Cloud with GCM

One of the Google services which received an update recently, announced at Google I/O 2012, was the Cloud to Device Messaging (C2DM) service. The next iteration has been labelled Google Cloud Messaging (GCM). Along with the moniker change, there are a few key changes between C2DM abnd GCM which add functionality and make it easier to use.

Of note:

Google states that C2DM will be maintained for moment, but won’t accept any new users nor grant new quotas. They also point out that C2DM and GCM are not interoperable. For example, you cannot post notifications from GCM to C2DM registration IDs, nor can you use C2DM registration IDs as GCM registration IDs. Your server-side application must keep keep track of whether a registration ID is from C2DM or GCM and use the proper endpoint. Fortunately they provide easy to follow instructions as to how to migrate your apps from C2DM to GCM and Google has even provided sample GCM apps (both client and server side) for you to look at (something which was sorely missing with C2DM).

If you haven’t yet used Google’s cloud messaging service, it’s now easier than ever – full instructions on getting started with GCM are given on the developer website. Just remember that it requires devices running android 2.2 (sdk version 8) or later.

Safari Books Online has the content you need

Check out these Android books available from Safari Books Online:

Android in Action, Third Edition is a fast-paced book that puts you in the driver’s seat–you’ll master the SDK, build WebKit apps using HTML 5, explore cross-platform graphics with RenderScript, learn to use Native Development Kit, and master important tablet concepts like drag-and-drop, fragments, and the Action Bar, all new in Android 3.
Beginning Android 4 is fresh with details on the latest iteration of the Android platform. Begin at the beginning by installing the tools and compiling a skeleton app. Move through creating layouts, employing widgets, taking user input, and giving back results.
Android in Practice is a treasure trove of Android goodness, with over 90 tested, ready-to-use techniques including complete end-to-end example applications and practical tips for real world mobile application developers. The book dives into important topics like multitasking and services, testing and instrumentation, building and deploying applications, and using alternative languages.
Android UI Fundamentals: Develop and Design walks developers through the different choices available on their way to creating a well-designed application for Android. While building a simple application, Jason works through the basics of Android UI development including layout, event handling, menus and notifications.
Programming Android shows experienced application developers what they need to program for the Android operating system — the core building blocks, how to put those blocks together, and how to build compelling apps that work on a full range of Android devices.
Whether you want to develop a commercial application for mobile devices, or just want to create a mobile mashup for personal use, Android Application Development demonstrates how you can design, build, and test applications for the new mobile market

About this author

Martyn Haigh has been a coder since his dad showed him a BBC Micro at the age of 3. He has a degree in Computer Science, likes clean code and has been programming Android devices for longer than it’s been commercially viable. In his spare time he snowboards, slays monsters and has been the Times Magazine person of the year on three different occasions. Sometimes he writes things on www.martynhaigh.com. He’d love you to visit.

About Safari Books Online

Safari Books Online is an online learning library that provides access to thousands of technical, engineering, business, and digital media books and training videos. Get the latest information on topics like Windows 8, Android Development, iOS Development, Cloud Computing, HTML5, and so much more – sometimes even before the book is published or on bookshelves. Learn something new today with a free subscription to Safari Books Online.
|

Comments are closed.

Facebook Twitter RSS feed