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
1
vote
1 answer

Volley BasicNetwork.performRequest: Unexpected response code 301

Hello I am having a problem. I am using Volley to request to https://swapi.dev/ RequestQueue queue = Volley.newRequestQueue(this); StringRequest request = new StringRequest(Request.Method.GET, "http://swapi.dev/api/planets/1/", …
1
vote
2 answers

views will not bind with data

I'm using View model and DataBinding. I have some data which is fetched from server and should be passed to ui. there for I wrote this view model class: class ProfileViewModel(val context: Context) : ViewModel() { private val viewModelJob =…
mohammad
  • 187
  • 1
  • 2
  • 15
1
vote
0 answers

Android Volley: BasicNetwork.performRequest: Unexpected response code 400

E/Volley: [1888] BasicNetwork.performRequest: Unexpected response code 400 for https://pastebin.com/raw/2WMVsLei Problem only Pastbin. I will try another https api but can't face any issue. Issue only occurs with pastebin api. public void logIn()…
1
vote
2 answers

Volley POST with URL ENCODED parameters not being passed

I need to make a HTTPS POST with urlencoded parameters like this : https://logintest.moveon.pro/?rest_route=/simple-jwt-login/v1/auth&email=Email&password=Password And get in return a JSON like this : {"success":false,"data":{"message":"Wrong user…
Daric
  • 83
  • 9
1
vote
1 answer

.Net webservice giving a 404 error when accessed by an android app while both individually work

I am not even sure if I should show any code, I have a web service which I created using .Net, I can access it both through browser & through Postman just fine. I have an android app with which I use the Volley library so I can make calls, calls to…
mvas
  • 11
  • 2
1
vote
0 answers

getHeaders Override method not being added to request

I'm trying to do a simple GET request in Android via Volley. However when I debug it the override method(s) are only called AFTER the request has been added to the queue. So my request thinks the headers object is empty and fails on the backend…
menix
  • 168
  • 1
  • 1
  • 7
1
vote
0 answers

How to change code from retrofit to volley

I have this api request code in retrofit i want to send the request using volley Everything is all right but i don't know what is the purpose of hasbody = true. And when i send request using volley it can't works. Kindly guide me how can i send…
Sobia Dar
  • 21
  • 1
1
vote
3 answers

Parsing Json data. Nested Objects giving an error

So i have this data as below and i am trying to parse the data, i can see a lot about parsing JSONArrays online however, not so much on objects within objects. I have had a go and am getting an error. Here is the Json response I am only trying to…
HTBuild
  • 53
  • 6
1
vote
1 answer

Android Kotlin: Override not possible?

I want to send an HTTP post about volley. According to IDE, I cannot overwrite the methods getBodyContentType and getBody, whether some examples on the net show this. What is the syntax (in braces) for it? What am I doing wrong? error message:…
Josef Soe
  • 91
  • 8
1
vote
0 answers

Nested Volley Requests in Android Studio in single session connection

I want to extract data from an HTTPS site. but It's generating an access code for every new opening of the website. so I used volley for getting access code once and getting the result of https once but when I am making 2nd request to get the…
1
vote
2 answers

How to set a conectivity timeout in Volley?

I'm using Volley to consume a Rest Service and I've implemented a timeout of 1500 ms using the setRetryPolicy method // test [ final long ini = System.currentTimeMillis(); RequestQueue queue = Volley.newRequestQueue(appActivity); final ApiRequest…
imperezivan
  • 761
  • 5
  • 13
1
vote
1 answer

Volley Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path

Hello i am getting the below error, getting error says expected array but was object i have also provide the url please guide...not familiar with json parsing just started unable to understand the error if possible please explain with the…
Paras Guglani
  • 21
  • 1
  • 3
1
vote
0 answers

I want to upload multiple images to the server using multipart using volley android studio

I want to send multiple images using multipart volley in this format. the format that i have written below is in swift language: multipartFormData.append(imageData, withName: "nverness\(i).jpg", fileName: "Inverness\(i).jpg" , mimeType:…
Sobia Dar
  • 21
  • 1
1
vote
2 answers

How can I use lambda expression here?

I have my custom GetVolley Class class GetVolley(private val mContext: Context, private val url: String, private val onVolleySuccess: OnVolleySuccess?, private val mOnVolleyError: OnVolleyError?, private val mOnVolleyEnd: OnVolleyEnd?) { private…
1
vote
0 answers

Why does volley always send another packet 5 minutes after the last packet is sent?

I have an android app that sends a request to the server via Volley. The communication is fine but I see unnecessary packets(no.385 ~ no.387) as below. These packets are always sent 5 minutes after the last packet is sent. Please let me know why the…
xgraph
  • 11
  • 1
1 2 3
99
100