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

Api call works on Volley but not on Retrofit

At the moment I am trying to change my Api code from volley to retrofit. The tutorials are simple but for some reason, when I do the api call on Volley it works and when I call it on Retrofit it doesn't. Before I start the api call I authorize…
1
vote
2 answers

Data duplication after SwipeRefreshLayout

I have added a SwipeRefreshLayout in my Activity to update the table in case of need, but I have had a problem that is the following. When I do the Swipe, for some reason the table is duplicated. This is my xml:
user14351562
1
vote
2 answers

How to send response of a volley POST request called from one activity to another in android

Requirement: In Android app code, in MainActivity, I want to call a REST POST API through Volley and then pass the JSON response as it is in next Activity. But the response which gets passed is blank. The code is: Please note…
grit639
  • 316
  • 1
  • 9
1
vote
2 answers

Problem with display MySQL data on android studio using volley

I am learning and trying to display some MySQL data using php to android studio using volley. The app is running with no errors but the data is not being displayed. I have tried to figure out why but had no luck for a few days (possibly due to I am…
swiftlearneer
  • 324
  • 4
  • 17
1
vote
0 answers

com.android.volley.parseerror org.json.jsonexception: Value connection of type java.lang.String cannot be converted to JSONArray

My add item code: public class carParts extends AppCompatActivity { ListView list; JSONArray data; customAdapter2 cust_adapater; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
ali Salami
  • 11
  • 1
1
vote
0 answers

Constant background polling in Android crashes app with java.lang.OutOfMemoryError

I'm trying to keep a constant poll in the background of an android application to check whether the connection to another device is successful or fails, currently using a Volley.newRequestQueue inside a method in a class to perform a Ping test to…
scollin3
  • 11
  • 1
1
vote
2 answers

VolleyError Unexpected response code 406 with REST GET request

I am trying to create the Android version of a curl GET request. Works great in terminal, but fails in the app. The curl request (urls are not real): curl -d '{"detail": "Y"}' -H "Content-Type:application/json" -X GET -H…
DevOpsSauce
  • 1,319
  • 1
  • 20
  • 52
1
vote
0 answers

I'm parsing a api in json array form but it show error as "Unexpected response code 403 for (url)"

This is screenshot of error Here is my code for fectching data private fun fetchdata() { val queue = Volley.newRequestQueue(this) val url = "http://newsapi.org/v2/everything?domains=wsj.com&apiKey=APIKEY" val jsonObjectRequest…
1
vote
1 answer

how to pass a Integer or double value with volley

I want to send a numeric value to the server using the getParams method.The Server API needs Integer values. server Api required integer value but i send a String value. my code is : StringRequest request = new StringRequest(Request.Method.GET,…
Ali Yazdanifar
  • 372
  • 4
  • 12
1
vote
1 answer

Post Request causes android.volley.NoConnectionError

I'm trying to send data from my android app to my .NET core Web API on localhost. The following is the error I get: com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust…
Muhammad Alam
  • 29
  • 1
  • 4
1
vote
1 answer

Can/should I write these interdependent Volley calls sequentially in Kotlin?

I'm writing an Android app for the first time, using Kotlin in Android Studio. I am quite new to asynchronous programming. The app will display some data to the user which it will obtain from a REST API using Volley. To get a meaningful set of data…
1
vote
0 answers

How to set data in recyclerview from volley response liatner in kotlin?

Hey there every one I really need some help. I want to set data in my recyclerview from my localhost database MySQL via volley. Here is my code and I dont know what it isn't working. can any one please help? I also want to know how can I use…
1
vote
1 answer

Response.Listener Volley in Android (java)

I'm beginner in programming, I want to request JSON . I have problem with Response.Listener, It have red underline and the callVolley is red too This is the script code. Would anyone help me? Thank you StringRequest strReq = new…
datok
  • 11
  • 1
1
vote
1 answer

Kotlin Volley POST Request: ParseError || Value Hat of type java.lang.String cannot be converted to JSONObject.message

When posting a JSONObject to my webservices, I always get the following error: I/System.out: Error com.android.volley.ParseError: org.json.JSONException: Value Hat of type java.lang.String cannot be converted to JSONObject.message Always the…