Missing Eclipse Menu Item for Android CloudTasks Demo

At Google IO 2011, there was fascinating talk about how to connect an Android application to a shared database. It was called “Android + App Engine: A Developer’s Dream Combination“. The demo itself goes by the name “CloudTasks”.  Like many things from Google, the source code is available for us to study and start our own projects.

When you import the source code for the CloudTasks demo program, there is a problem with running it in the Android emulator and connecting to your own local Google App Engine application. For projects of this type, there should be an item on the Eclipse “Run – Debug As” menu that allows you to run and debug a “local app engine connected Android application”. That  menu item is missing. Here’s what you do to fix the problem.

My guess is that  the source code available for download from the Google Code Cloudtasks page was created with an earlier version of the Google plugin for Android. So you have to do the following steps:

1. Use Eclipse’s Import command to import the two projects: CloudTasks-Android, CloudTasks-AppEngine.

2. Locate and  edit the “.project” file for the CloudTasks-Android project,

3. Find the last line in the section of the file that begins with <natures>.

4. Change the <nature> element that indicates the type of the project.


As soon as you do that, the Debug As item appears. Then you are ready to see if it all works.

Debug As menu after fix to CloudTasks

Here’s my short version of the instructions. The best explanations are in the resources I link to below.

  1. Start the app by selecting “Debug As” for the item “App Engine Connected Android Application”.
  2. Inside the running Android app, bring up the menu for app. Choose which Google Account you want to use.
    If you do not have a Google account set up in your emulator — and you probably do not — set one up. (If you do not see the option to set up an account, change your virtual device so it runs using Google APIs 2.2 or later.)
  3. Run the App Engine application in your web browser. When prompted for a user name, use the same name you  just set up in the Android app.
  4. Add a task in the web application, just to see that it is working.
  5. Go back to the Android App and see if the tasks shows up. If it does, great.
    You now know that you are connected to the same database as the web application.
  6. Touch the “+” button in Android app so you can add  a task from there.
    As you hit save, keep you eye on the web application. It should update within a second or two.

At this point, you should be able to add items to the to-do list, in either the web application or the Android app. No matter where you are, any changes you make are propagated to the other one.

Additonal Information

Here are the resources related to CloudsTasks that I have found useful.

The best place to start, in my opinion, is the video from the Google I/O 2011 conference. The title alone gets your attention: “Android + App Engine: A Developer’s Dream Combination”. It’s one hour long so you have to wait a bit before you see why it really might be a dream combination. At some point, start at the beginning of the video and watch the whole thing. However, if you want to skip ahead to the conclusion, here’s a link into the video, about 44 minutes in, that shows the finished demo: Android + App Engine: A Developer’s Dream Combinition at 46:36.


  •  Blog article from Brad Abrams. – These are the best notes about the demo program, how to use it, and how to get started with your own project. There are two demo programs mentioned early on in the article: CloudTasks and BigDaddy. I suggest trying both of them.
  • App Engine Connected Android Application – This provides a good summary of what the architecture is behind the demo.
    With the newer versions of the Google plugin for Eclipse, you can easily create projects like those in the demo.
  • Android Cloud To Device Messaging Framework – This is a detailed description of C2DM, which is the service that helps you keep your Android app in sync with changes made in your server-side database.

About Bill Lahti

Bill Lahti is a software engineer building mobile applications and knowledge management solutions. Two of his interests are writing for this blog and building Android apps, with strategy games being an area of particular interest.
This entry was posted in Android and tagged , , . Bookmark the permalink.

4 Responses to Missing Eclipse Menu Item for Android CloudTasks Demo

  1. Bhanushali Ashwin N says:

    Great Work,
    Thanks to share with us.
    I am working on Android Project and I want partially Opened SlidingDrawer in my application by googling I found that I have to modify android.widget.SlidingDrawer sourcecode.
    I had downloaded sourcecode for sliding drawer and from last 15 days i am trying to achieve my goal but I am stucked in a situaltion where I can partially open the sliding drawer but touch events are not managed properly.
    I appreciate your help.

    • blahti says:

      I don’t know the details around what you are doing, but I am wondering if it is an absolute necessity to have the source code for SlidingDrawer. Having worked with Android source code before, I have found that it takes a lot of effort (but in the end, well worth it) to read and understand the classes there. When I wanted to add drag-drop for a GridView (see my demo GridView app), I was able to get drag-drop working by adding subclasses and having them implement the interfaces for DropTarget and DragSource. The reason that it works is that so much of the drag-drop behavior comes from DragLayer and DragController, which can be added without altering standard classes. I’d suggest studying the GridView example thoroughly and reading the comments too. I am hoping that helps you find a way to subclass some standard views from Android related to SlidingDrawer. Reading Java doc for a class is usually enough and that would save you from going through the Android source code. That worked for me for ImageView. I hope this helps. (If it turns out that I have misunderstood your question, please rephrase and post a little more information on the drag-drop blog article.)

  2. Albert says:

    Hi, I just want to know if someone has make the Hello World android-app engine app? After I do everything and I click Say Hello, it shows me a message saying: “Conencting to the Server”vand it does not do anything else. Could someone tell me what can it be? Thanks in advance

    • blahti says:

      I did succeed in getting it to run. What I never got working correctly was the part where C2DM notifies the Android App that changes have occurred. This was several months ago. I will look around to see if I have source code that I can share.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s