Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to develop Google App Engine backend using Android Studio

I am trying to add Google App Engine functionality to my Android App. I am using Android Studio, and have had a look at Brad Abrams Google I/O talk and another tutorial, but Android Studio seems to have moved on from where it was at this time last year, and the Google Cloud Endpoints functionality has been removed. I can see at GitHub that the menu option "Generate App Engine Backend" was removed from Android Studio and replaced with "New App Engine Gradle Module".

Are there any options to allow me to generate the App Engine Backend like in those examples from Android Studio, or do I need to use Eclipse to do this?

like image 265
None The Wiser Avatar asked Apr 02 '14 19:04

None The Wiser


People also ask

How do I create an android app backend?

For the backend development of Android apps, developers use a form of JavaScript known as Node. js. This framework, among several other aspects, enables a developer to manage data changes from the frontend and create robust network frameworks capable of handling multiple concurrent user requests.

How do you create an app backend?

In Android Studio, open an existing Android application that you want to modify, or create a new one. Select the Android app module under the Project node. Then click Tools > Google Cloud Endpoints > Create App Engine Backend. In the wizard, enter the Project ID, Project Number, and API Key of your Cloud project.

Does Google use Android Studio?

Android Studio is the official integrated development environment (IDE) for Google's Android operating system, built on JetBrains' IntelliJ IDEA software and designed specifically for Android development.


1 Answers

This answer is based on AndroidStudio 0.8.3.

  1. Select the top most level of your project, right click New > Module and select App Engine Java Endpoints
  2. set the name for your module, such as mymodule
  3. Your build.gradle file will now have a new line:

    compile project(path: ':mymodule', configuration: 'android-endpoints')

  4. Now you will want to open mymodule/src/main/webapp/WEB-INF/appengine-web.xml and replace myApplicationID with your appengine PROJECT ID which you can get from cloud.google.com/console

  5. You can now either change the configuration to myModule (toolbar) and press run. It will launch a local server, or you can select Gradle on the upper right hand side of the window and look for :mymodule and click on appengineUpdate or appengineUpdateAll.

More detail here and GitHub

like image 130
Les Vogel - Google DevRel Avatar answered Oct 25 '22 10:10

Les Vogel - Google DevRel