Google App Engine and Android (OAuth, C2DM or cloud messaging)

Like many users of this board, I would like to develop an Android application with the Google App Engine as a server server. I need the user to log in with their Google account and upload the image to the GAE server. This is what I have done so far:

First I found this site about Android, GAE and C2DM messages . I did my best to follow the tutorial, learn how to develop Android applications and how to create a Java server in GAE, but it turns out that C2DM is now not recommended!

Then I started learning Java servers with OAuth authorization and an experimental GAE feature called Cloud Endpoints , which should make my life easier with Android + Google App Engine.

My question is: which is the best way to connect Android with GAE, with authorization privileges and block storage loading? Using OAuth + Cloud Endpoints, C2DM Messages, or any other interface technology, t mentioned?

+5
source share
1 answer

Google endpoints are the way you mentioned that C2DM is out of date. Cloud endpoints make it extremely easy to create an Android api for communicating with Android clients. You don't have to do much with cloud endpoints, just code your application by following this oAuth tutorial

Once your application is ready, you just need to annotate your code or make it automatically using the eclipse plugin.

A quote from the docs development process is as follows:

General workflow for developing an application using endpoints:

  • First write your internal application code.
  • Annotate the App Engine firewall code, so classes and client libraries can be created from it. (Alternatively, use the Google Plugin for Eclipse, which will automatically annotate you.)
  • Create the client library using the endpoints.sh utility. (Alternatively, use the Google Plugin for Eclipse to create the client library.)
  • Write your Android client application using the client library when accessing the App Engine server through 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 verge of bleeding, so keep that in mind when you create your application.

Hope this helps and good luck!

+4
source

Source: https://habr.com/ru/post/951866/


All Articles