Android Meet App Engine, App Engine Meet Android

Posted by Chris Ramsdale - Tuesday, May 10, 2011 at 2:17:00 PM

Imagine this: you’ve spent the past few months hammering away at the latest mobile game sensation, Mystified Birds, and you are one level away from complete mastery. And then it happens. In a fit of excitement you throw your hands up, and along with them your Nexus S, which settles nicely at the bottom of the pool you happen to be relaxing next to. The phone is rendered useless. Luckily, your insurance policy covers the replacing the device and the Android Market handles replacing your apps. Unluckily though, all of your Mystified Birds data went the way of your device, leaving you to start from scratch.

Wouldn’t it be great if your new device not only contained all of your apps, but all of your valuable data as well? We think so. With Google Plugin for Eclipse (GPE) v2.4 it’s much easier to build native Android apps that can take data with them wherever they go. And there’s no better place to host your backend service and store your data than Google’s cloud service, App Engine.

With the latest release of GPE, we’re bringing together these two great Google platforms, Android and App Engine, with a set of easy-to-use developer tools. Diving a bit deeper, here are some of the features offered in GPE 2.4:

Project Creation
With GPE 2.4, you now have the ability to create App Engine-connected Android projects. This new Eclipse project wizard generates fully functioning Android and GWT clients that are capable of talking to the same App Engine backend using the same RPC code and business logic.

Cloud to Device Messaging Support
Polling for backend changes on a mobile device is inefficient and will result in poor app performance and battery drain. As a solution for Android developers, the Android team built Cloud to Device Messaging (C2DM), a service for sending lightweight pings to notify apps when they have pending data. We heard back from developers that integrating with C2DM results in a lot of boilerplate (and sometimes fragile) code that they would rather not maintain. With the 2.4 release of GPE, when you create a new App Engine connected Android project, you’ll get this code for free. All you have to do is hook up the app-specific code to customize the handling of the C2DM notification.

RPC Generation and Tooling
Writing and maintaining RPC code (code that allows your app to communicate with backend servers) is monotonous and error prone. Let's face it, you're a mobile developer and the last thing you want to be spending time on is writing (or debugging) this type of code. In GPE 2.4 we're introducing tooling that removes this task for you, and will generate all of the underlying RPC boilerplate code within a few clicks. You specify the model objects that will be used between client and server, and GPE generates the RPC service, DTOs, and client-side calling code. To make this even better, the generated code works across Android and GWT apps, so any future changes that you make will only need to be made once.

Want to get started? Download GPE 2.4 Beta here. Note that you’ll need to install the Android Developer Tools (ADT) plugin as a prerequisite, which can be found here.

If you have any feedback, we’d love to hear it and the GPE Group is the right place to submit it. The App Engine and Android Developer Groups are also great sources of information.

Chris Ramsdale, Product Manager, GWT and GPE cramsdale@google.com

17 comments:

Mustafa Al-Hassan said...

So excited!

Allahbaksh Asadullah said...

Whether it uses ProtocolBuffer by any chance. I think it will still take a long time for google to make GWT a complete indispensable product.

Vince Vice said...

this is just awesome!
wow, thanks a lot.

aniFlipClock - KUSE.IT said...

that made my day!

haven't done this step with cloud-use yet, cause of missing an easy way to do.

now i can give it a try!

Vamsidhar Kadiyala said...

Google saved my day, i was planning to support a common RPC service for both Android, GWT clients. Thanks

Mike Evans said...

When will the source code for the demo that was shown at IO be available on Google Code?

MS said...

I was exited when I read about it, but I can't find any documentation on the same. Does anybody know where to find it? Thx

Patrick Jackson said...

anyone else having issues with the sample project that the google plugin creates? I am not able to send messages, but the device does register.

This is great!

Chris Ramsdale said...

@Patrick, have you confirmed that the role account that you registered with the C2DM service has been enabled?

Chris Ramsdale said...

@MS, our initial documentation can be found here:

http://code.google.com/eclipse/docs/appengine_connected_android.html

We're working on updates, and should have more fleshed out docs soon.

Lars Vogel said...

Looks like http://code.google.com/eclipse/docs/release_notes.html is not maintained anymore. Could you update the release notes?

David Chandler said...

@Lars Vogel, GPE release notes are now combined with the GWT release notes. I'll add a note to the GPE release notes pointing this out.

Lars Vogel said...

@David Chandler Thanks!

Mr. Noob said...

Where can I get GPE 2.4 Beta :)

Gaurav said...

Google saved my day, i was planning to support a common RPC service for both Android, GWT clients. Thanks
android developer

Pigeon Software said...

Hi.
Can you elaborate on which Android versions this is supported?
I don't see it mentioned anywhere.
I wrote an app which uses Android + App engine (no C2DM) and it seems to work fine on 2.2+ but not 2.1.

Lester Sonemann said...

In trying to set up the project, I encounter the following in the wizard:

This feature is not complete as yet. It will be available in the next release.

etc. etc.