Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)



Setup

Before starting this tutorial, you need to set up your environment with the necessary requirements.

Building and deploying the Backend API

This tutorial assumes that you have completed the API backend tutorial and that you have deployed it to production App Engine. If you haven't done that yet, follow the link and complete that task first.

Generating the client library for the backend API

You must generate the backend API client library.

To do this:

  1. Change directory to the directory containing your backend API's app.yaml file and API service classes.

  2. Invoke the Endpoints command line tool as follows:

    /appengine-sdk-path/endpointscfg.py get_client_lib java -o . helloworld_api.HelloWorldApi
    
  3. When successful, the tool displays a message similar to:

    API client library written to ./helloWorld-v1.zip
    
  4. Unzip the .zip file and at the top level of the resulting /helloworld subdirectory, locate the file named something similar to:

    <your_project_id>_appspot_com-helloworld-v1-20140113220645-java-1.17.0-rc-sources.jar

    Make a note of the location of this file: you'll need to copy it into your Android project later.

Downloading and installing Android Studio

This client tutorial uses Android Studio, so you need to download and install it following the instructions on the download page.

Installing Android SDKs and required packages in Android Studio

You must install the API package for each API level you want to support in your app, and you must install required packages.

To install the SDKs:

  1. Start Android Studio. (In Linux, you do this by invoking studio.sh .)
  2. Close any projects currently open ( File > Close Project .)
  3. Click Configure > SDK Manager in the Quickstart pane to display the Android SDK Manager.
  4. Select the following items in the Android SDK Manager, under Tools :
    • Android SDK Tools
    • Android SDK Platform-tools
    • Android SDK Build-tools (19.0.1)
  5. Select the following items under Android 4.4.2 (API 19) :
    • SDK Platform
    • Google APIs
  6. Select the following items in the Android SDK Manager, under Extras :
    • Android Support Repository
    • Android Support Library
    • Google Play Services
    • Google Repository
  7. Click Install Packages and wait for the install to finish.

Enabling your Android device for debugging

In this tutorial, we'll run the app on a real Android device, so you need to enable your Android device for debugging .

You should also become familiar with the process of deploying an app to an Android device .

Next

Create and configure your Android Endpoints project.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.