I am using Volley library in android.I run the same url in the browser and it returns in less than a second.I would like to know , how can optimize Volley? Not clear on what is
I had a similar kind of situation. I didn't notice the time delays as you did, but it was showing up in the browser and not in my app. Essentially, clearing the cache helped me out.
You can clear the cache by:
Requestqueue.getcache().clear();
If you want to disable the caching for jsonrequest
s, you can do that by:
jsonrequest.setshouldcache(false)
This had solved my problem of the caching.