Hide
Cloud Tools for Android Studio

Add a Cloud Endpoints Module

Here's how you can add a Cloud Endpoints backend module in Android Studio:

  1. Start Android Studio and open the project for the Android app that needs the new backend.

  2. Right-click on your project and select New > Module.

  3. Select Google Cloud Module from the list, then click Next :

    Choose backend module
  4. Select App Engine Java Endpoints Module, and then supply the remaining information in the New Google Cloud Module form:

    Enter module parameters
    1. Supply a module name for your backend; this name will be displayed and used in your Android Studio project.

    2. Supply a package name. This package name will be used for all classes imported from this template.

    3. Select the client module (containing your Android app) in this project. This module will be automatically set up to have the right compile and build dependencies to be able to call your newly generated backend.

    4. Click Finish to generate the new backend.

  5. Select Tools > Android > Sync Project with Gradle Files to sync the project.

At this point, you've created a new buildable and runnable backend module for your Android Studio project and added it as an additional dependency in your project's settings.gradle file.

In particular, a new Gradle module with your specified module/package name has been added to your project containing your new backend. All of the required dependencies/permissions have been automatically set up for you.

Using the Cloud Endpoints backend module

For detailed instructions on how to connect your Android app to the backend, how to debug and test locally, and how to deploy, see the README at the App Engine Java Endpoints Module GitHub repository.

Suggesting changes or enhancing the backend module templates

If you want to make suggestions to improve or enhance the Cloud Endpoints backend module template, you are welcome to visit the GitHub repo and submit a pull request.