How to do a simple async task using volley library android
Asked Answered
L

1

8

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

Lilith answered 30/5, 2013 at 13:3 Comment(0)
I
16

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.

Imogen answered 30/5, 2013 at 13:26 Comment(3)
Here you can find several examples. I hope that they will be usefulImogen
Volley also provides powerful cancellation policy by which you can cancel single request or whole queue.Deathlike
use volley library-Have a look at this -stackoverflow.com/questions/16836992/…Nonstop

© 2022 - 2024 — McMap. All rights reserved.