Questions tagged [android-volley]

Volley, a cutting-edge Android library developed by Google, revolutionizes the way networking and remote image loading are accomplished on the platform. With its streamlined functionality and significant performance improvements, Volley sets new standards for simplicity and speed.

Android Volley library fails to process PHP POST request

In my Android app, I used Volley to make a POST request with the following code snippet. JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Method.POST, ServerURL.URL_REGISTER, new Response.Listener<JSONObject>() { @Override public ...

The process of transforming a String response into an iterable entity

I'm currently working on an Android/Java app where I need to make a REST API call using the Volley library. Here's the code I have so far: RequestQueue queue = Volley.newRequestQueue(this); String url ="https://covid19datasl.herokuapp.com/countrie ...

Looking for advice on how to load JSON data into a CardView within a RecyclerView using Volley

I am using these classes, and they were working fine with some static data. Here is the JSON response I received: [{"place_name":"Udon House"},{"place_name":"Casa Biance"},{"place_name":"Pizza hut"},{"place_name":"Pearl Continental "},{"place_name":"Laho ...

Implementing Android Volley framework

Hey folks, I could really use some assistance! I'm a beginner with Volley and have been tackling login and registration using it. Specifically, I'm struggling with inserting and retrieving data in the database using JSON arrays and objects. Below are my ...

Analyzing URLs with curly braces in an Android application

Is it possible to parse a URL with curly brackets, like http://example.com/api/login/{username}/{password}, in an Android application? A regular Volley post request returns HTML, but I require JSON format. How can the Login API be integrated into an Andr ...

Tips for troubleshooting common network errors in Volley

When attempting to access this function through WiFi, it works fine. However, when using a mobile network, I encounter the following error: D/Volley: [3641] BasicNetwork.logSlowRequests: HTTP response for request=<[ ] 0x95bac5ee NORMAL 14> * 2020-0 ...

Strip  symbol out of json output

Currently, I am utilizing the Volley Library to parse JSON data. However, when parsing the response, it contains a certain symbol at the beginning: JSON RESPONSE : {"category":{"420":{"key":420,"label":{"420":"Acacia"},"count":"1"},"421":{"key":421 ...

Retrieve JSON response from a POST request

When I send the data using POST method, I receive the answer in JSON format. However, if I switch to plain text instead of JSON, it works fine but not with JSON. No error message is displayed in the application. If status = true -> Registration successfu ...

Profile picture not found: JSON Error: Value is missing

I'm encountering an issue with my web service that is supposed to return a list of images (profile pictures), along with their names and ID numbers. Unfortunately, some members do not have profile pictures, so I am trying to add a default image from t ...

Struggling with Volley sending inaccurate data. Is there a way to replace onPostExecute()?

Utilizing Volley for fetching JSON data to populate a RecyclerView list, the initial JSON file provides information such as: id server status If a new JSON is requested using "Server URL/server/id," additional information about the server/item can be ob ...

Instructions on how to load a spinner with a pre-set prompt from a MySQL database by utilizing JSON

I am having an issue with setting a default prompt to the spinner in my Android Studio app using MySQL. I have tried setting the same value from XML with the spinner attribute for prompt, but it is not working properly. Here is my code snippet: public sta ...

Support for UTF-8 encoding in JsonObjectRequests within the Volley library

I am working with a utf-8 json file and I need to ensure it is properly displayed with utf-8 support. output = (TextView) view.findViewById(R.id.jData); JsonObjectRequest jor = new JsonObjectRequest(Request.Method.GET, loginURL, null, new ...

Parsing JSON and presenting it in a recycler-view card fragment

I've been attempting to parse JSON using Volley and display it with a recycler-card view in my tabbed fragment class on Android. However, the JSON response is not being displayed in the fragment. Despite no errors or exceptions showing up, the app runs smo ...

Retrieve JSON data from a WordPress site that is powered by WooCommerce, using basic authentication

I am in the process of creating an Android application that retrieves product data from a WordPress site. The website has the Woocommerce plugin installed. I have been able to successfully obtain the JSON data using Postman software and basic authenticat ...

The TextView is not displaying the Android Json data retrieved from mysqli

Currently, I am conducting a basic test to display JSON data fetched from PHP MySQLi in a TextView. TextView mTxtDisplay; String url = "http://192.168.1.102/web_service/test.php/"; @Override protected void onCreate(Bundle savedInstanceState) { super ...

Learn the process of including authorization header in Android using Volley library for GET requests

how to send Authorization header using volley library in android for GET method please help me thank you public void token(){ SharedPreferences userInfo = getActivity().getSharedPreferences(DataManager.SharedPreferences, Context.MODE_PRIVATE); S ...

What is the best way to display a particular category in a RecyclerView by parsing data from a JSON

I am looking to populate a RecyclerView with project data from a specific category only. For instance, in the JSON provided, there are 2 projects in the "Cabs" category, so I want to include only these 2 projects. Conversely, if the category is equal to "T ...

Error: The system encountered a surprise character () at the beginning of the input

Having trouble parsing the JSON response from the following link: and no matter what I try, I keep getting this error message. W/System.err: Unexpected character () at position 0. public class MainActivity extends AppCompatActivity { Text ...

Using StringRequest to post Volley with JSONObject in Android platform

I'm currently facing some confusion after asking a question regarding JSON decoding on the PHP side. My focus is on decoding a JSONObject posted from Android Volley using StringRequest. While I successfully created code for inserting data into MySql, I ove ...

Is Volley equipped with built-in support for JSON arguments and string responses?

I am trying to send a JSON payload via a server POST request and receive a string response. After researching extensively, it appears that doing this with the Volley library is not straightforward unless I create a custom request (which I find daunting). ...

How to Send and Receive Data in One Request Using Android Studio and Web API

Currently, I am working on an Android App using Android Studio and the backend is being developed using Asp.Net Web API. Web Api Part [System.Web.Http.AcceptVerbs("GET", "POST")] [System.Web.Http.HttpGet] public dynamic GetTest(string name) { List< ...