Volley is a networking libary developed by Google and officially use for Android for query data via network, especially Internet. It's was first introduced during Google I/O 2013. Volley is guaranteed to be easy to use, fast and used exclusively for Android programming invironment. For further details, you can watch this introduction VIDEO from Google Developers.
Why using Volley?
Moreover, with using Volley, you won't need to consider the distribution of the threads (main and net work threads) be cause it handles everything. You can avoid using AsyncTask or Handler to split the network threads separately.
And most importantly, it's much faster. Some time ago, the Google+ team did a series of performance tests on each of the different methods you can use to make network requests on Android. Volley got a score up to ten times better than the other alternatives when used in RESTful applications.
Import Volley to Android project
git clone https://android.googlesource.com/platform/frameworks/volleyGit will clone this reporsitory to your computer as "volley" folder:
Now, we will import this libary to our Android Project. After start a new one from Android Studio, click Menu File-->New...-->Import Module... and choose Volley folder:
Click Finish button and waiting for auto-sync gradle process completed. After this step, Volley has became a module in our project:
Then, open app/build.gradle file to add Volley dependency, by this final step, this libary will be integrated to our project:
compile project(':volley')Syncing our project again by click "Sync Now", now importing process has been done, we can start coding!