Bora
Bora

Reputation: 1925

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

Upvotes: 8

Views: 9004

Answers (1)

Ognyan
Ognyan

Reputation: 13600

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.

Upvotes: 16

Related Questions