hchouhan02
hchouhan02

Reputation: 946

Best Approach to get & send data from server in Android

Hi i am a iPhone developer and new to android. I want to know a best approach in android to make a http connection and get the response from server and (like iOS there are connectionDidFinish, connectionDidFail methods) i want to show a loader when connection is start and when connection is complete then i dismiss the loader. how to do that.

I read about HttpConnection, HttpURLConnection, DefaultHttpClient but i am too confuse that which is best approach and how to use them and one more thing connection is like a asynchronous connection.

one more thing i want to make two or more connection so that i have to differentiate between them also so suggest me that also?

Upvotes: 0

Views: 240

Answers (1)

Paresh Mayani
Paresh Mayani

Reputation: 128428

To show and dismiss loader (i.e. ProgressBar or ProgressDialog), implement AsyncTask which is known as Painless Threading in Android.

Upvotes: 1

Related Questions