-1

I started to learn android few months before and now i am better in developing User Interface. Now i wish to learn that android app connect to server and fetch content from the database. Please suggest me with some good solutions so that i can proceed further in android development.

So examples for android app connecting to server and fetching content:

Assume i have button named list of flights. When i click on that my app should connect to server and fetch all the available flights from the server and make it visible in list view. Similarly for User login also i should user data in server and do validation whenever they login.

Please help me out soon!!!!!!!!! Thanks in Advance Guys..................

Kalaiselvan
  • 398
  • 1
  • 5
  • 14

2 Answers2

1

You can refer following links to get better idea about making calls with server in Android:

  1. http://code.tutsplus.com/tutorials/android-sdk-making-remote-api-calls--mobile-17568
  2. http://blog.strikeiron.com/bid/73189/Integrate-a-REST-API-into-Android-Application-in-less-than-15-minutes
  3. this question will also help you.

Also there are so many Libraries out there which can ease your work. One of them is Volley.

Here is a link for Getting Started with Volley

Apart from this, the more you search more insight you will get in this.

Community
  • 1
  • 1
uniruddh
  • 4,333
  • 3
  • 50
  • 86
1

If the web service response is in JSON. Then you can use example available at this link http://www.androidhive.info/2012/01/android-json-parsing-tutorial/

user2980181
  • 307
  • 1
  • 3
  • 13
  • thanks.....but one doubt.But there is a link which shows the content which we receiving from the web.Similarly how can i creates such sample kind of json data with my own web domain URL – Kalaiselvan Oct 21 '15 at 06:59
  • Do you want to view your json response?? – user2980181 Oct 21 '15 at 07:01
  • To create your own web domain url..first you need to create webservice which will provide you response in json/xml format. You have to look for how to create webservice?? – user2980181 Oct 21 '15 at 07:05
  • http://api.androidhive.info/volley/person_object.json (from this link we are retreiving data. Similarly how can I create such kind of sample data for my app if i have my own web domain) – Kalaiselvan Oct 21 '15 at 07:05
  • Please have a look at this link https://trinitytuts.com/build-first-web-service-php/ it will help you to create your own webservice. – user2980181 Oct 21 '15 at 07:08
  • i referred that how to integrate that to android application – Kalaiselvan Oct 21 '15 at 07:13
  • You don't have to integrate it to android side. Its a server side code. From android you just have to hit this url. – user2980181 Oct 21 '15 at 07:15