Home » Android » How to do a simple async task using volley library android

How to do a simple async task using volley library android

Posted by: admin June 15, 2020 Leave a comment

Questions:

As you know Google has announced a new library Volley to manage network request based on HTTP Protocol.

But if i want to use this library to connect to msql db . Currently i am using async task to do my network calls .

How to implement volley library to do async task ? any links or example . sorry for bad english 🙂

How to&Answers:

Volley is starting background thread(s) on its own so all the network requests are executed off the UI thread so basically you don’t need to use AsyncTask anymore. Of course you will have to take care to cancel the running requests on rotation or when user exits your activity.