Getting started with Volley for Internet requests
Android includes multiple libraries for Internet queries, including the Apache HttpClient
and HttpURLConnection
. The Apache HttpClient
was the recommended library before Android 2.3 Gingerbread (API 9). Android 2.3 Gingerbread (API 9) saw many improvements to the HttpURLConnection
library and it became the recommended library, and still remains so today. With the release of Android 6.0, the Apache HttpClient
has been removed completely from the SDK, leaving the HttpURLConnection
library as the recommended replacement.
Though the HttpURLConnection
library still works and has its uses, there are drawbacks: it's not the easiest library to use if you are new to writing web requests and it requires a lot of repetitive overhead code. Fortunately, we have a new option from Ficus Kirkpatrick, a Google Developer from the Google Play group. He released a library called Volley, which provides a simplified wrapper. (It uses the HttpURLConnection
library...