Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do a simple async task using volley library android

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 :)

like image 364
Bora Avatar asked May 30 '13 13:05

Bora


1 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.

like image 169
Ognyan Avatar answered Sep 24 '22 06:09

Ognyan