Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine and Android (OAuth, C2DM, or Cloud Messaging) [closed]

As many users of this board I would like to develop an Android app with Google App Engine as the backend server. I need the user to log-in with his/her Google account and upload an image to the GAE server. This is what I have done so far:

First I found this website about Android, GAE, and C2DM messaging. I made an effort to follow the tutorial, learned to develop android apps and how to create the Java server in GAE, but it turns out that C2DM is now deprecated!

Then I started to learn about Java backends with OAuth authorization and a GAE "experimental" feature called Cloud Endpoints that is supposed to make my life easier when dealing with Android + Google App Engine.

My question is: which is the best way to connect Android with GAE, with authorization and blobstore upload capabilities? Using OAuth + Cloud Endpoints, C2DM messaging, or any other interface technology that I haven't mentioned?

like image 342
Jaime Ivan Cervantes Avatar asked Oct 05 '22 22:10

Jaime Ivan Cervantes


1 Answers

Google Endpoints is the way to go as you mentioned C2DM is deprecated Cloud Endpoints makes it extremely easy to create an Android api to communicate with Android clients. You don't really have to do much with cloud endpoints, just code your application by following this oAuth tutorial

Once you have your application ready then its just a matter of annotating your code or getting it done automatically using the eclipse plugin.

Quoting from the docs the development process is as follows:

The general workflow for developing an app using Endpoints is:

  1. Write your App Engine backend code first.
  2. Annotate your App Engine backend code, so classes and client libraries can be generated from it. (Alternatively, use the Google Plugin for Eclipse, which annotates automatically for you.)
  3. Generate the client library using the endpoints.sh utility. (Alternatively, use the Google Plugin for Eclipse to generate the client library.)
  4. Write your android client app, using the client library when making calls to the App Engine backend via the Endpoint.

And here is a working java example on github.

Also keep in mind that Endpoints is an experimental feature meaning it is on the bleeding edge, so keep that in mind when you build your app.

Hope this helps and the best of luck!

like image 74
Tkingovr Avatar answered Oct 10 '22 03:10

Tkingovr