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
15
votes
2 answers

Getting Robolectric to work with Volley

I am trying to get Volley working with Robolectric. I can see that my HTTP request is getting called, and parseNetworkResponse is getting called (I'm sending a custom subclass of JsonRequest), but my Listener is NOT getting called. Any advice? Here…
adevine
  • 1,074
  • 9
  • 23
14
votes
1 answer

Posting form-data Parameters in the body using Volley

This is the Post Request done using postman The response I want to get is : { "result": "success", "reason": { "first_name": "aswath", "last_name": "AsH", "email": "selviragu09@gmail.com", "phone": "\"8867336754\"", …
14
votes
5 answers

Android volley error: "Trust anchor for certification path not found", only in real device, not emulator

I'm having a problem in my Android app, in one of my fragments I use volley to do a network request: JsonObjectRequest request = new JsonObjectRequest( Request.Method.POST, …
Sammy Patenotte
  • 1,284
  • 2
  • 10
  • 12
14
votes
3 answers

Post Json object data to get Json array response using volley in android

I need to post JSONObject (using Volley) to a web-service which is returning the response in JSONArray format. Here is what I have tried so far. final JSONObject requestJsonObject = new JSONObject(); requestJsonObject.put("username",…
Santhosh
  • 4,956
  • 12
  • 62
  • 90
14
votes
2 answers

Should I use OkHttp with Volley library?

I am using Volley library in my android app. It works fine, but I saw that OkHttp provides some more improvements also. I have integrated the OkHttp with Volley using : Volley.newRequestQueue(mCtx.getApplicationContext(), new OkHttpStack()); My…
User31689
  • 716
  • 1
  • 6
  • 12
14
votes
10 answers

UTF-8 encoding in Volley Requests

In my Android app I am loading json data with a Volley JsonArrayRequest. The data were created by myself and I saved them with Sublime with UTF-8 encoding. When I get the Response and fill my ListView, the texts are not displayed correctly…
JensJensen
  • 1,017
  • 1
  • 12
  • 25
14
votes
3 answers

making a GSON request using volley

I have the following json response { "tag": [ { "listing_count": 5, "listings": [ { "source": "source1", "data": { "image": "image1", "name": "name1" }, …
Abhay Sood
  • 480
  • 2
  • 6
  • 20
14
votes
3 answers

How to implement Android Volley with OkHttp 2.0?

This OkHttpStack is no longer supported in OkHttp2.0: https://gist.github.com/JakeWharton/5616899 What is the current pattern to integrate OkHttp 2.0.0 with Volley?
JohnRock
  • 6,795
  • 15
  • 52
  • 61
14
votes
3 answers

Android Volley POST string in body

I'm trying to use Volley library to communicate with my RESTful API. I have to POST string in the body, when I'm asking for the bearer Token. String should look like this: grant_type=password&username=Alice&password=password123 And…
Stepan Sanda
  • 2,322
  • 7
  • 31
  • 55
14
votes
4 answers

display NetworkImageView's default image without network request

I have a ListView displaying things, many of which have an illustrative image and some of which don't. The ViewHolder uses NetworkImageView to display the illustrations. The problem is that even if a default image is set, it won't be displayed…
Turnsole
  • 3,422
  • 5
  • 30
  • 52
14
votes
4 answers

com.android.volley.ParseError: org.json.JSONException

I got this error from volley library @Override public void onErrorResponse(VolleyError error) { error.printStackTrace(); } the error com.android.volley.ParseError: org.json.JSONException: Value [{"id":"admin","name":"Admin"}] of type…
13
votes
6 answers

How to send json array as post request in volley?

I am using volley for json parsing. I want to send some data using POST to server side. I am trying to send .Now can any one tell me that how can i send filter array to server? Following is my snippet code. i tried also Hashmap and Jsonobject. but…
chris
  • 699
  • 4
  • 12
  • 35
13
votes
1 answer

SSL Pinning using Google Volley

I am starting my question by mentioning what I have tried so far: I do not have certificate in my app, I am using SHA256 key only, Most of the answer on internet requires physical certificate in app to load it in keystore, I don't have that. I am…
13
votes
5 answers

Cannot resolve symbol 'RequestQueue'

I am new to android studio and volley library so please bear with me. I've added volley library by GitHub and then and added this line to build gradle file: compile 'com.android.support:appcompat-v7:23.0.1' And now I am trying some tutorials about…
Guest012393
  • 255
  • 1
  • 4
  • 15
13
votes
4 answers

Does Android Volley support SSL?

Does anyone know whether Volley supports SSl in Android? Is there is any way to support SSL via Volley?
Ajay Shrestha
  • 2,433
  • 1
  • 21
  • 25