Android: What is the best HTTP library for uploading images to server? [closed]

AndroidAsynchttps://github.com/koush/AndroidAsync

android-async-httphttps://github.com/loopj/android-async-http

okhttphttps://github.com/square/okhttp

http-requesthttps://github.com/kevinsawicki/http-request

android-volleyhttps://github.com/mcxiaoke/android-volley

ionhttps://github.com/koush/ion

retrofithttps://github.com/square/retrofit

Bolts-Androidhttps://github.com/BoltsFramework/Bolts-Android

 

 

 

The library you mentioned are very different in nature. They can be more or less grouped like this

Socket level API:

This includes

  • AndroidAsync
  • okhttp
  • HttpClient
  • HttpURLConnection

These are very low level API, which built around how to send packages through Socket and optimization.

Among these, android 23 now uses okhttp internally, and okhttp has been around for a very long time, which makes it my personal favourite for Socket level API.

Higher level API:

These API are built to help developer to develop faster with ease of use, it usually works as a wrapper on Socket level API. Here is the relation between them

  • Retrofit – okhttp
  • android-async-http – HttpClient
  • ion – AndroidAsync
  • Bolts-Android – not sure what it base on
  • Volley* – depending on API level, HttpURLConnection / HttpClient in system library

Image Loading API:

Volley is a special API, it is a High Level API, but it has another usage, which is Image Loading. These type of API includes the following:

  • Volley
  • Picasso
  • Fresco
  • Glide

Conclusion:

For your scenario, I believe you are looking for a High level API. However, it would be difficult to suggest the Best API, it would depends on usage and personal preferences.

Volley WAS* not a very good as a High level API, several functionality are not included, e.g. Https, data stream upload. I would suggest you to start seeking the best library for your project, starting with Retrofit, ion and Bolts.

*I haven’t tried Volley since I used it on the first year when it is released, it could have changed.

Edit:

I have just installed Instagram app and checked their OPEN SOURCE LIBRARIES section, they have included android-async-http, which is likely to mean they used it for HTTP requests.

warningComments are closed.