Volley is an Android HTTP library that was introduced by Google to make networking calls much simpler. By default all the Volley network calls are made asynchronously, handling everything in a background thread and returning the results in the foreground with use of callbacks. As fetching data over a network is one of the most common tasks that is performed in any app, the Volley library was made to ease Android app development.
You can build Volley from the official Google source code. For a while, that was the only option. Or using one of the third-party pre-built versions. However, Google finally released an official maven package on jcenter.
In your application-level build.gradle
file, add this to your dependencies list:
dependencies {
...
compile 'com.android.volley:volley:1.0.0'
}
Ensure the INTERNET
permission is set in your app's manifest:
<uses-permission android:name="android.permission.INTERNET"/>
Google has not provided very extensive documentation on this library, and they haven't touched it in years. But what is available can be found at:
https://developer.android.com/training/volley/index.html
There is unofficial documentation hosted on GitHub, although there should be a better location to host this in the future: