0

I ran into google app engine as it seems a simple server solution for beginners and found this link to help me start: https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/HelloEndpoints.

I did the tutorial and it went well but I find it strange and maybe I don't understand how to use it but for my understanding for each Api Method in my endpoint I need a different AsyncTask, and that makes the client coding much more complicated. So there is another, better way to use this?

And what is the most common approach to build a client-server Android application, I mean how to build the client class to handle the interaction with my services? should I use simple HTTPRequest or something else? I would really like to have a nice client service handler example.

Alex K
  • 8,269
  • 9
  • 39
  • 57

1 Answers1

0

In android, the best way to do server request is by using Async class. All the background processess should go through this, Async. Apart from it you have some option to use Handlers and Loopers but I would recommend you to go into those now. Ypu can design the class extended by Asynctask class that will handle all the request and responses. In addition if in case you want top access UI thread that you can do with runOnUiThread option. Here is good answer check this

Sorry I forgot to mention, it also depends what kind of services you have built and what type they are retuning for example json or soap.

for Json response you have good librabry called as volley cehck this

Community
  • 1
  • 1
JNI_OnLoad
  • 5,472
  • 4
  • 35
  • 60
  • Thanks. But correct me if i am wrong if i use a class wich extends the AsyncTask i have to create class per method of my endpoint so this is making the client code complicated. About the volley if i use the google app engine endpoint it is unnecessary to use volley because the response is already parsed right? – newtoandroid Jan 16 '15 at 14:53