Questions tagged [android-volley]

Volley is a Google library for Android that makes networking and remote image loading easier and faster.

Written by Ficus Kirkpatrick and his team, Volley is a library released by Google at I/O 2013. The Google Play Store and a number of apps by Google use this library to perform network requests and remote image loading. The developers at Google claim that network requests performed through Volley are up to 10 times faster than other libraries according to their tests. There is also an official documentation and a Github.

You can clone the GIT repository by running this command:

git clone https://android.googlesource.com/platform/frameworks/volley
6757 questions
21
votes
2 answers

Uploading multiple images with volley?

I have gone through a lot of post in SO and other tuts as well.But i couldn't get any latest official or other post that doesn't contain any deprecated code for uploading multiple images using volley.I came to know Apache HTTP Client removal and…
Stella
  • 1,817
  • 6
  • 30
  • 55
21
votes
4 answers

How to make a .jar out of the Volley project?

How do I make a .jar file out of the Volley project (git repository)? I have tried to follow the instructions in this answer, however running android update project -p . in the cloned volley folder throws this error: Error: . is not a valid project…
zbr
  • 6,860
  • 4
  • 31
  • 43
21
votes
6 answers

Volley's NetworkImageView - setImageBitmap method doesn't work

Im using volley library in my project. I usually let the NetworkImageView download images using setImageUrl method: networkImageView.setImageUrl(imageUrl, mImageLoader) This works fine, But.. When I try to download the bitmap "manually" using…
dor506
  • 5,246
  • 9
  • 44
  • 79
21
votes
2 answers

Set expiration policy for cache using Google's Volley

Is it possible to modify the expiration policy for the cache on Google's Volley lib? I believe you can implement your own cache, however is there an easy way to do this with the default implementation?
Patrick Jackson
  • 18,766
  • 22
  • 81
  • 141
20
votes
5 answers

How to make separate class for volley library and call all method of volley from another activity and get response?

how to create a separate class in which define all about volley and in another activity we directly pass URL,CONTEXT and Get Response...
Kalpesh Kumawat
  • 369
  • 1
  • 3
  • 8
20
votes
2 answers

How to configure the Http Cache when using Volley with OkHttp?

I want to try Volley combining with OkHttp but Volley cache system and OkHttp both rely on the HTTP cache as defined in the HTTP specification. So how can be disabled the cache of OkHttp for keeping one copy of HTTP cache? EDIT: what I have…
Xiaozou
  • 1,655
  • 1
  • 15
  • 29
20
votes
5 answers

Detailed debug logs with Volley

In Restkit on iOS there is a verbose debug option. RKLogConfigureByName("*", RKLogLevelTrace);. Does anyone know if there is an equivalent for Volley. Basically I am going straight to the ErrorListener but I get no additional info in LogCat.…
Mika
  • 5,807
  • 6
  • 38
  • 83
20
votes
6 answers

Volley - http request in blocking way

I'm learning how to use Google Volley these days. It's very convenient for fast networking. It seems that all the requests are running in background in Volley. For example: volleyRequestQueue.add(new JsonObjectRequest(Method.POST, SIGNUP_URL,…
Fihop
  • 3,127
  • 9
  • 42
  • 65
19
votes
4 answers

"Warning: Do not place Android context classes in static fields; this is a memory leak (and also breaks Instant Run)"

Similar question have been asked here, here and here but the context is quite different from this and moreover the code that gave from this error is written by the makers of Android and Android Studio. This is the code: public class MySingleton { …
X09
  • 3,827
  • 10
  • 47
  • 92
19
votes
7 answers

getApplicationContext() on a null object reference

I allways get this java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference error while I run my app. I saw other answers but I didn't…
user5209063
19
votes
2 answers

Getting headers from a response in volley

I am working with Volley, I want to make request to a server which returns me a JSON in the "vissible layer" (I can see it in the web browser). My problem is that the server also returns my in the headers information that I need to get in my App,…
Chopi
  • 1,123
  • 1
  • 12
  • 23
19
votes
1 answer

How to upload file using Volley library in android?

I already have a sub class of Request that is used for http post to the server. The problem is, I have no idea on how can I add a parameter for a file. Posting string to the server is easy. but I need to add file as a different…
Earwin delos Santos
  • 2,965
  • 7
  • 20
  • 29
19
votes
4 answers

Android Volley, duplicate Set-Cookie is overridden

Trying to use Volley lib as a network wrapper for my android application. I have a connection up and running, but the problem is that every time there is multiple "Set-Cookie" headers in the response Volley uses Map that cannot have duplicate keys,…
RompaP
  • 193
  • 1
  • 5
19
votes
9 answers

Volley - Sending a POST request using JSONArrayRequest

I'm using Volley to interact with an API. I need to send a post request (with parameters) to a service that returns a JSON Array. JsonObjectRequest has a constructor that takes a method and a set of parameters JsonObjectRequest(int method,…
Marc Mailhot
  • 480
  • 1
  • 5
  • 13
18
votes
3 answers

How can I make Android Volley perform HTTPS request, using a certificate self-signed by an Unknown CA?

Before making the question, I found some links, which I checked, one by one, and none of them, gives me a solution: well-kown CA HTTPS request using volley accept all SSL certificates No peer certificate Exception - Volley and Android with self…
codermx
  • 235
  • 1
  • 2
  • 9