InterDash Blogs

Sharing experience

Android with Cloud backend example

Cloud Android

Last week I attended the Google Cloud Platform Road Show which for me was an introduction to Google Cloud offerings. I’d looked at their offerings before but it was nice to hear what they are currently working towards as well.

After a week of ‘messing around’ I’ve made a little progress but must comment on how difficult it has been to get a sample up and functional. The problem for me was my environment was out of date and trying to follow the documentation doesn’t lead to success even when it is fully updated.

It had been a couple months since I had built my environment, which in the Windows world I could get away with because things don’t seem to change as quickly. It also seems new documentation is appearing daily, or I’m just stumbling on new stuff as I research through my problems. I believe much of what I am dealing with is getting used to the Android development environment.

Decisions and Getting Started

I’m on the fence about Android Studio vs Eclipse, but for the Cloud work it seems at this time Eclipse is the supported platform. The cloud offerings have a command line based set of tools for administration tasks and deserves further research that go beyond the scope of this post.

You can get started at and work through their documentation or you can try and follow the instructions in this post where I reference many of the documents but offer screen shots and more specific details.


The ADT must be current (with Juno Eclipse). If you need to update I’ve found replacing my existing installation on Windows 8 to be fairly easy. I accomplish this by first renaming my existing ADT directory and unpacking the new distribution, and then renaming the new version to the installed ADT name.

NOTE: I also had to update the Eclipse shortcut as it apparently followed the renamed directory.

When you start up Eclipse you should now see clearly you are running Juno. Provide a workspace and allow the ADT to launch.


In order to add in the Android Cloud SDK select ‘Help’ and ‘Install New Software’ from the Eclipse IDE menu.

Following the steps for setting up the Android environment at Google Plugin for Eclipse

Enter in the “Work with:” text box and press Enter.

Select the tools of interest, skipping Maven unless you are using Maven and know how to configure your environment for Maven. Click ‘Next’ and review the Install Details. If there are components that won’t install they will appear here. Everything selected should be installable if the environment has a new enough Java version.

You must select the ‘I accept the terms…’ radio button to click ‘Finish’.

At the end of the install you will see the following Security Warning. Click OK.

You should end with the following dialog.

Install the latest Google Play Services SDK provides detailed documentation but I felt needed a little more specific details for this example.

Under this link in Step 2 you Import -> Existing Android Code into Workspace and then reference the google-play-serivces_lib from the client application.

The steps to accomplish this are:

  1. Establish a Project and Deploy the backend – This should have been done or needs to be done before running the application. It does take some time so be patient after clicking ‘Deploy’. The information about the deployed process will display when it completes.

Click ‘Mobile Backend Starter’

If the Backend has not been created you will see only step 1, Deploy the backend. Click on ‘Deploy’ and wait. There are status messages while it processes but I did end in an error and had to navigate to the ‘Mobile Backend Starter page’ from Projects in the Console.

… wait a long time …

I got an error so I had to navigate back to the ‘Mobile Backend Starter page’ by accessing the Project through the Google Console and clicking on ‘Mobile Backend Starter’ the link at the bottom

Successful Deployment

When the deployment has completed you should be looking at the following.

Click the ‘Settings’ link on step 2.

In the ‘Authentication / Authorization’ section select the ‘Open (for development use only) radio button and click ‘Save’ and close the tab.

Download the Android Client application

For step 3 the client application is downloaded when you click ‘Android Client’.


This can be unpacked in the development directory

Later we will import this code into the workspace using:

Add the support libraries using the SDK Mangager


  1. Using the SDK Manager select the Google Play Services and other support tools and SDKs.

    Installing for the absolute latest you might elect to include the SDK Platform Android 20, L preview and it’s supporting emulators. I also elected to include the most recent platform 4.4W.

    In Extras I selected ‘Google Play services’ with the ‘Google USB Driver’ already selected by the defaults. Install the updates.



  recommends the ‘Android Support Repository’ and ‘Google Repository’.

    I also included the support for KitKat (4.4.2 API 19) as that is what my device is currently running.



  1. Copy from the google-play-services_lib for your workspaces to import from the ADT directory.

At the start of this posting I installed a new version of the ADT Bundle at ADT64, so I can change to that directory and drill into the ‘ADT\sdk\extras\google’ directory to copy the library files. I prefer to make a copy in a common directory on my development machine so the original copy is not referenced directly.

  1. Import the google-play-services_lib into a workspace.

Set the Build Target

Right click on the google-play-service_lib project and click on ‘Properties’. Select the ‘Android’ section and check ‘Android 4.4.2’ for the ‘Target Name’. Make sure the ‘Is Library’ is checked and click ‘OK’.

Set the SdkVersion

Open the Manifest file and change the androidminSdkVersion to match your installation. In this case, from 9 to 19.

In order to prevent the lint warning message you can also set allowBackup, for example

‘Save All’ and then ‘Clean’ the project.

Android Client Application

  1. Import the mobile Android client application as an Android Application Project.

Set the SDK Version

Open the Manifest file and change the SdkVersion to 19.

Fix library reference

  1. Reference the Google-play-services_lib from the client.

Right click on the ‘CloudBackendAndroidClient’ and click on ‘Properties’. From the ‘Android’ tab make sure the ‘Target’ is your desired version, in this case Android 4.4.2. You may also note that the ‘google-play-service_library shows an error. Click ‘Add’ and select the imported project.

Remove the error by selecting the item and clicking ‘Remove’.

Set Project ID

  1. Configure the client application for use with your application.


Navigate to the ‘’ in the endpoints-lib… namespace and set the DEFAULT_ROOT_URL to your project.


  1. Run the application and leave an anonymous note.

Connect a device or run-up your emulator and then right click on the ‘CloudBackendAndroidClient’ and select ‘Run as an Android App’.

On your device or Emulator you should be looking at the opening screen. Click on the right arrow and advance through the introduction.

You may note the Auto Monitor Logcat dialog pops up. I usually click ‘yes’ so I can see the log.

You probably don’t want to see the intro every time so check ‘Skip intro next time’ and click ‘Done’. You should see the Cloud Guest Book appear.


Once the application has fully connected you can leave a message.

You can see the call in the LogCat tab.


This summarizes my initial attempt to get the Mobile example up and running. Since I started by installing the newest ADT bundle and am reasonably new to Android programming I decided to capture these details. I don’t expect these instructions will remain 100% accurate for long as Google changes thing so quickly but the basic steps are explained in more detail to assist troubleshooting. I hope it helps.

Updated: August 4, 2014 — 11:05 pm

Leave a Reply

Your email address will not be published. Required fields are marked *

InterDash Blogs © 2014 Frontier Theme