

You can also create custom request by extending Volley’s request class. The default request classes already included in Volley library are String request, JSON request, and image request. RequestQueue queue = Volley.newRequestQueue(this) Īfter instantiating RequestQueue, a request must be created. To use it, first you need to instantiate the RequestQueue and later on you can start or stop request, add or cancel request and access the response cache(s). Volley is a networking library managed by the RequestQueue and mainly used for smaller Networking purposes in Android. Understanding RequestQueue & Working With Volley In Android:

When user request the same data, instead of calling from server Volley directly shows it from cache saving resource and thus improving user experience.

Volley provide solution to this problem as it caches the data. Since the user is calling the same resource again to server so it is a waste of resource and ultimately a poor user experience. The activity is destroyed and so the content will be fetched again. The content is fetched in the portrait mode and now user rotate screen to change it to landscape mode. For example, lets say you are using Asynctask to fetch image and description from a JSON array created in server API. Volley uses caches concept to improve the performance of App. Volley Uses Caches To Improve Performance In Android:
