FAQ Database Discussion Community


Picasso with new Target loads bitmap from second time

android,android-volley,retrofit,picasso
Below is my code. During navigating to the screen for the first time onPrepareLoad() gets called. But it does not come to onBitmapLoaded() or onBitmapFailed(). Could some one lighten up. Is it loading only from Cache always? How to handle it. I am using only default Cache mechanism. No external...

How I can use Realm to parse a large JSON and storing data

android,json,android-volley,realm
J'm really blocked into parsing and storing data using Realm,I have a large JSON and I creat all the class models like the example of RealM. this is my error :Caused by: org.json.JSONExcept ion: Value fr at 0 of io.realm.exceptions.RealmException: Could not map Json at io.realm.Realm.createObjectFromJson(Realm.java:860) at com.example.volleyapp2.ImagesActivity$ImagesFragment.loadData(ImagesActivity.java:179) at com.example.volleyapp2.ImagesActivity$ImagesFragment$2.onResponse(ImagesActivity.java:133)...

Send post data to server using Volley android

android,post,android-volley
I am trying to send some data to the server using the Volley library. private void registerUser(final String email, final String username, final String password) { // Tag used to cancel the request String tag_string_req = "req_register"; pDialog.setMessage("Registering ..."); StringRequest strReq = new StringRequest(Method.POST, AppConfig.URL_REGISTER, new Response.Listener<String>() { @Override public...

Volley String cannot be converted to JSONObject

java,android,arrays,json,android-volley
I'm always getting the following error as long as i put a array into Params. Even after converting to String it still gives that error. The code works fine without the contactlist array inside it. Any idea? Error com.android.volley.ParseError: org.json.JSONException: Value Created of type java.lang.String cannot be converted to JSONObject...

VollyError return null on below API Leval 21 android

android,singleton,android-volley
I am Using volley as networking library for my android application. Now mainly i want to handle two type of error 1. Authentication 2. Network Error Below snippet code work perfectly on Lollipop. But when i run application on lower API 21 then object of VolleyError return null. public Response.ErrorListener...

Android Volley error.getMessage() is blank

android,android-volley
So I am making a POST JSonObjectRequest to my server and when it is successful everything works and the info is posted, but if there is an error and I try to display it in a toast, it shows up as blank. Here is my request: private void logUserIn() {...

What is the use of Volley API in android?

java,android,android-volley,androidhttpclient
In my android apps development use instead of HTTPs go for volley API some one suggested me what is the difference between volley API and HTTPs thans!!

Volley-Lib -> String cannot be converted to JSONObject with a real JSONObject

android,android-volley
the JSONObject is this: {"tag":"login","success":1,"error":0,"name":"pb","dir":"DH","br":"LL","gr":"IW","email":"empty"} logcat says: Value Access of type java.lang.String cannot be converted to JSONObject the running an AsyncTask beside, and it works. why the volley-code says its a string? The answer from the server is a JSONObject for sure.... Why it says its a String? private void...

how to send array of params using volley in android

java,android,json,android-volley
I am developing an application which send lot of data to server.Now i want to send an array of params to a php page using volley.But i am not able to send it. Code for adding params as Array. String[] arr =new String[7]; for(int i=1;i<=7;i++) { arr[i]="questionId_"+i+"_"+"ans_"+i; } HashMap<String ,String[]>...

Android Volley: null value being received at server for String params sent with POST request

android,http-post,android-volley
I am sending POST query along with String data from android device using Volley library. The server however, is receiving only null values for the params. My code goes like this: final String param1 = "one"; final String param2 = "124843"; final String param3 = "878942"; final String param4 =...

How to use network frameworks (volley , okhttp , etc) in libgdx?

android,libgdx,android-volley,okhttp
I want to load some data from web using volley or okhttp in libgdx. How to use network frameworks like volley or okhttp in libgdx instead of libgdx networking class ?...

How to perform loop with volley

java,android,json,android-volley
I have problem with loop. In my opinion this should work, but goes one through the loop. I have to do check availability server and I don't have other ideas. Server give answer: {"exist":true} do { generateNumber = generate(); getExsistResponse = "http://skidd.herokuapp.com/exist/" + generateNumber; final StringRequest request = new StringRequest(Request.Method.GET,...

JSONArray response with Volley for Android

android,json,android-volley
I am posting some data into the database using Volley and I get the following jsonarray response. [ { "nickname":"panikos", "username":"[email protected]", "user_type":"LEADER", "latest_steps":"0" } ] This is a sample of my code that unfortunately doesn't log out or debug the variable of "nickname" object:(. final JsonArrayRequest jsonObjReq1 = new JsonArrayRequest(AppConfig.URL_GET_TEAM,...

Cannot instantiate a list in fragment using volley library

android,android-fragments,android-volley
My problem is that when i put this code in an activity, it works fine, but when i am trying to use fragments, it's generating errors this is where the error shown: public class CustomListAdapter extends BaseAdapter { private Activity activity; private LayoutInflater inflater; private List<News> newItems; ImageLoader imageLoader =...

Can't use Volley to display two custom ListView

android,json,android-layout,listview,android-volley
I am a beginner in android, and i am trying to use Volley to create a custom list which contains list of images and text description for each. There are two activities as list view, downloaded json data using volley, use OnItemClickListener to start other activity. the first activity is...

Fixing javax.net.ssl.SSLPeerUnverifiedException: No peer certificate

java,android,https,ssl-certificate,android-volley
I am developing an android app that has to communicate with server over https with self signed certificate (SSL/TLS1.2). I am also using Volley. I am following this tutorial. Saved the .crt file, created key.bks in raw directory with keytool -importcert -v -trustcacerts -file "cert.crt" -alias IntermediateCA -keystore "key.bks" -provider...

Post request on volley not sending parameters on first click

android,http-post,android-volley
Im making an app in android studio and im using volley library to make post requests on the click of a button. The first time i press the button the response is always null, but the second time it works properly. Here's the code: public class LoginActivity extends Activity{ Button...

Empty Response Received on Android POST Request

android,rest,android-volley
I'm using Volley to perform rest requests on android. When I make a login attempt it fails to give the response and instead returns an empty response. The server side works fine, I have received the empty response on Android client side. This is the code I wrote: HashMap<String, String>...

How/Where to store HTTP-Request URLs in Android?

android,httprequest,android-volley
I am not sure how/where I should store my Http-Request URLs and how to organize them. I am developing a server and a client for Android. On the client I am using Volley for the network communication which so far seems like a very useful tool. The only thing I...

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

android,android-volley,okhttp
In my project, i want to try Volley combining with OkHttp. But the cache system of Volley and OkHttp both rely on the HTTP cache as defined in the HTTP specification. So how to disable the cache of OkHttp for keeping one copy of HTTP cache? EDIT: what i have...

Diffrence between JsonObjectRequest & JsonArrayRequest in volley in android?

android,json,http,android-volley
Hello all i am using volley to send request to the server. I am sending some params to server & getting a json array & json object in response. As of now i am using JsonObjectRequest custom request for getting the response.If the response is JsonArray i get the json...

How to use ImageLoader of Volley Library?

android,image,nullpointerexception,android-volley,loader
I am using volley library to load image from network and getting nullpointer exception. I am using it in Adapter class.Is there any problem in getting instance or what i am not getting. getView() throws nullpointerexception VolleySingleton.java package com.w3nuts.babaa.helper; import android.content.Context; import android.graphics.Bitmap; import android.support.v4.util.LruCache; import com.android.volley.RequestQueue; import com.android.volley.toolbox.ImageLoader; import...

Getting new token on retry before retrying old request with Volley

authentication,queue,token,android-volley,priority
I have a simple authentication system implemented using Volley. It goes like this: Get a token from server on login -> an hour later, this token expires -> when it expires, we will find that out on a failed API call, so we should (on retry) -> fetch a new...

Custom List View with thumbnail using Android Volley Library will not load any results

java,android,json,android-listview,android-volley
I am trying to load a custom listview using Volley Networking library but there are no results while running the app and no errors on the code. The data come from a JSON file JSON OUTPUT HERE Below are my classes : MainActivity.java package info.androidhive.customlistviewvolley; import info.androidhive.customlistviewvolley.adater.CustomListAdapter; import info.androidhive.customlistviewvolley.app.AppController; import...

how to send json object to server using volley in andorid

android,json,android-volley
I wants send the json object to server using post method . i have used volley library to pass the string params its working fine, but if i try to use json object its showing an error for calling the json object here is my code private void makeJsonObjReq()...

Making two requests with android volley

android,android-volley
I need to make two requests with different parameters, response and parameters with volley. Below is my code private void LoadFirst() { pDialog = new ProgressDialog(getActivity()); // Showing progress dialog before making http request pDialog.setMessage("Loading..."); pDialog.show(); final StringRequest userReq = new StringRequest(Method.POST, AppConfig.URL_REGISTER, jsonSubjectListener, errorSubjectListener) { @Override protected Map<String, String>...

Send a JSONArray POST request with android volley library

java,android,json,http-post,android-volley
I would to send and recive json Array with volley. Now I can recive the array and it's ok. but I don't know how to send an request (For example : with post method ) ; JsonArrayRequest arrayReq = new JsonArrayRequest(URL, new Listener<JSONArray>() { } ...

How do I upload large files (10MB) in Android?

android,android-volley
I am currently used to using Volley to make my requests and upload json. However, the developers of Volley state that it should not be used to upload large files. I was wondering if there is a standard that currently does this in Android?

Using ListView volley image to another activity: java.lang.RuntimeException: Unable to start activity ComponentInfo: java.lang.NullPointerException

android,android-listview,nullpointerexception,android-volley,runtimeexception
Have been trying to pass some images and text from my Volley ListView to another activity and had some issues with the images. When I only pass the text, it shows with no problem but as soon as I insert the code to extract the images I get the following...

Get Instagram Access Token with android volley

android,instagram,access-token,android-volley
i use this code for post a request to instagram and get accesstoken. URL url = new URL(tokenURLString); HttpsURLConnection httpsURLConnection = (HttpsURLConnection) url.openConnection(); httpsURLConnection.setRequestMethod("POST"); httpsURLConnection.setDoInput(true); httpsURLConnection.setDoOutput(true); OutputStreamWriter outputStreamWriter = new OutputStreamWriter(httpsURLConnection.getOutputStream()); outputStreamWriter.write("client_id="+CI + "&client_secret="+ CS + "&grant_type=authorization_code" +...

Android Studio: import com.android.volley.xxxx Cannot Resolve Symbol 'xxxx'

android,json,android-listview,android-volley
So, I followed this tutorial to create a ListView with images using Volley but I am having this issue with the com.android.volley.xxxx import statements in LruBitmapCache.java, AppController.java, CustomListAdapter.java, and MainActivity.java. It shows as Unused import statements and its extension are in red saying Cannot resolve symbol xxxx. Volley.jar is already...

Consuming APIs with volley?

android,arrays,json,rest,android-volley
I am trying to consume APIs with the library volley, but i can't because it doesn't show me anything when I run the app. I think the problem is that the URL API has that in it (json): {"books":[{"book":{PARAMETERS...}}]} so I can't access my parameters. Then my URL API doesn't...

Android volley library, where to use and where not to

android,android-asynctask,android-volley
As our typical old asynctask network connection is getting replaced by volley. It's fast as I have used so I know. I downloaded images and showed. When I again restarted the app it didn't take time to download. So is it caching images for sometime ? And as it is...

android volley will resize(subsample) large images automatically

android,android-volley
in my app i have to download high resolution images from my server. i am planning to use volley. the image loading is work well for small images.for some high resolution images it throws out of memory exception. i have tested with some sample images it will throw out of...

Google Volley Android: Login

php,android,android-volley,login-script
I'm trying to use Volley to send a Username and Password to a php which uses that inputs to compare then to see if everything is correct, and send back the informations, like name and picture, but I'm not understanding how to make this communication, on internet I've found how...

Send rest request after async responses volley

android,rest,request,android-volley
I searched about this topic and I didn't found something to clear my doubts. My problem is that I must fill some form fields with data that I have in a server using a rest api. Basically I throw 3 different independent requests, as they are independent I throw them...

Whether picasso supports image disk caching

android,caching,android-volley,disk,picasso
Before I had worked on Volley and I have used the DiskLruCache [link] with Volley to cache images on disk. Now I have been working with app that is using Picasso. I would like to know whether Picasso supports disk caching. If it supports how can I fix the cache...

How I send a JsonObject and recive a JsonArray

android,json,android-volley
While I was testing the "volley" library, a doubt arose me regarding the method "post". The thing is that I have been working with JsonObject until now, for that I used the following code and it works. In this method I send and JsonObject and receive another JsonObjet, I had...

Parsing JSON object with JSON array inside it using Volley

android,json,android-volley
I have a Json reponse like this: { "status" : "CREATED", "message" : "user created", "results" : [ { "id" : "1243233", } ] } The above JSON response will be obtained with a POST call.In android using volley library i did a REST call as following: JsonObjectRequest jsonObjReq =...

Android volley library is not accepting parameters in url from getParam()

android,string,web-services,request,android-volley
Android volley library is not accepting parameters from getParam() method.If it is given in query String then it works.I tried both GET and POST it doesn't works. But I want to give parameters POST Method.please check the code I have posted below. RequestQueue queue = Volley.newRequestQueue(getApplicationContext()); String url = AppConstants.WEBSERVICE_URL...

Android: I am unable to download an image with the URL I have to use due to formatting issues

java,android,image,bitmap,android-volley
I am using an API that returns a String for the URL of a photo. It is in a strange format, however, and it is causing me issues downloading the images using Volley (or any other method for that matter). My code looks like this: imageview = (ImageView) findViewById(R.id.imageView); String...

loading json array with volley library

java,android,arrays,json,android-volley
I have an fragment that in first I get some data from web API in JSON array and extract whats in the array. Then I give this two array (names , img_url) to custom grid view to show user. But, my JSON array that I use volley library to get...

Add item to ListView (JAVA)

android,json,listview,android-volley
I'm trying to get strings from a JSON file and add them to ListView. There isn't any problem in my getting JSON strings codes, my main problem is when I want to add them to a listbox. I have two classess, one is my MainActivity.Java and second is HandleJSON.Java. I'm...

how to read response header's status code and response body in volley library android

android,json,android-volley
I am using volley library for network call in android . i am using jsonObject to send the value to server and getting json value from server. in my case if i send the correct value its returning correct json object , but if i send wrong input to...

Volly imageLoader onResponse imageContainer width null

android,imageview,android-volley,image-loading
I'm trying to get image bitmap and redraw it in rounded image . but unfortunately i got NPE on imageContainer [the width is actually NULL]. here is what i have tried so far, @Override public void onResponse(ImageContainer image, boolean arg1) { RoundedDrawable rd=new RoundedDrawable(image.getBitmap()); holder.image.setImageDrawable(rd); } ...

Networking app architecture

android,facebook,rest,network-programming,android-volley
I'm building an android app similar to a facebook app, aimed to display various information stored in a database. I'm using on the server-side a REST API, which returns responses based on various POST requests, with a facebook token authentification. And on the client-side, I'm using the volley library to...

How do I put generic type for Gson's TypeToken?

android,json,gson,android-volley
EDIT After experimenting for a while, I know my problem is. I can't put generic type inside TypeToken (Type type = new TypeToken<CustomResponse<T>>(){}.getType();). When I change T into POJOA, I can run my app just fine to deserialize json into POJOA, but not into POJOB and POJOC. How do I...

how to access a value in JsonArray with volley library

android,json,android-volley
My problem is that i can't find a way to access a value in a JSON object. this is the format of my JSON: [ { "title": "Foot - ANG - Eden Hazard (Chelsea) élu joueur de l'année de Premier League !", "link": "http://www.lequipe.fr/Football/Actualites/Eden-hazard-chelsea-elu-joueur-de-l-annee-de-premier-league/554292#xtor=RSS-1", "description": "Comme attendu, Eden Hazard a...

Volley - more than one request in the same Activity android

android,android-activity,android-volley
I want to send two different requests and handle two different responses in one Activity using Volley library. My activity implements onResponseListener, so i have only one onResponse method and both responses are handled here. As they are completely same in structure i cant tell which is which. How can...

CustomListview Volley with Image doesn't works in real device

android,listview,android-volley
Someone, help me with this problem. i have stuck in 3 days because this problem -_-! i can make listview with image and text using volley library, its works in emulator (i use genymotion emulator) the image and text show. but when i run it in my device (android Jelly...

Volley ExecutionException

android,android-volley
i am trying to implement login using volley like below: public static JSONObject register(RequestQueue requestQueue, String url, HashMap<String, String> params) { RequestFuture<JSONObject> requestFuture = RequestFuture.newFuture(); CustomRequest customRequest = new CustomRequest(Request.Method.POST,url,params,requestFuture,requestFuture); JSONObject response = null; requestQueue.add(customRequest); try { response = requestFuture.get(30000, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { L.m(e + ""); }...

How to perform Infinite scrolling in android using Volley request

android,android-listview,android-volley,infinite-scroll
I have a listview in an activity which renders a list values obtained from the JSON response.I am successfully able to display list view the code is as shown below listView = (ListView) findViewById(R.id.list); adapter = new CustomListAdapter(this, productList); listView.setAdapter(adapter); pDialog = new ProgressDialog(this); // Showing progress dialog before making...

Volley org.json.JSONException when parsing valid JSON

java,android,json,android-volley
I am trying to parse the API: http://api.devnews.today, which is valid JSON as verified here: http://jsonlint.com/ and parsed on a web front-end here: http://devnews.today. I am building an Android client to also parse this data using Volley. The code below throws the Error.Listener, but returns part of the expected JSON:...

How often should an Android app and server sync

java,android,playframework,sync,android-volley
I'm developing an Android app that talks to a Play-framework app, the two apps are passing user data between one another using Volley requests, my question is this: Is it desirable to have the Android app sync with the Play server constantly to check for changes to the user profile?...

android - rounded NetwrokImageView

android,android-volley,networkimageview
I am working with volley library to extract image URLs from server which are square in shape. I want to display it in Round shape. In volley library I am setting image in NetworkImageView like : profilepic.setImageUrl(imgURL, imageLoader); ...

java.lang.IllegalStateException: Fragment not attached to Activity

android,android-fragments,android-activity,android-volley,illegalstateexception
I am rarely getting this error while making an API call. java.lang.IllegalStateException: Fragment not attached to Activity I tried putting the code inside isAdded() method to check whether fragment is currently added to its activity but still i rarely gets this error. I fail to understand why I am still...

android parse jsonObject with volley

android,json,gson,android-volley,http-get
I first time try to parse json with volley. i found some examples and i learned how to use it. but I have one problem.... i have like this json { "Items ": [ { "Branch" :"mybranch", "City" : "London" }, { "Branch" :"mybranch1", "City" : "Paris" }, { "Branch"...

Execute a Volley request after another one is finished

android,android-volley
I have two Volley requests. The first request authenticates the user; the second one gets data from the server. If I send a GET request and the user is not authenticated, I want to fire the first request, authenticate the user and then keep executing the second one once the...

Using custom Volley POST doesn't return anything

android,post,android-volley
I'm trying to use a custom Class that extend the JsonRequest class to send a JSONArrayRequest using POST and a parameter. public class MethodJsonArrayRequest extends JsonRequest<JSONArray> { public MethodJsonArrayRequest(int method, String url, JSONObject params, com.android.volley.Response.Listener<org.json.JSONArray> listener, ErrorListener errorListener) { super(method, url, params.toString(), listener, errorListener); Log.d("method", Integer.toString(method)); Log.d("jsonRequest", params.toString()); } @Override...

Android Volley - Strange Error with HTTP code 401- java.io.IOException: No authentication challenges found

java,android,android-volley
I meet this error when send a request and get back response with code 401: com.android.volley.NoConnectionError: java.io.IOException: No authentication challenges found Some people say that: This error happens beause the server sends a 401 (Unauthorized) but does not give a "WWW-Authenticate" which is a hint for the client what to...

Volley deliverResponse not being called

java,android,android-studio,android-volley
I am using Volley and I see the parseNetworkResponse being called and all ok. The parsing is fine I can see in the logs and I don’t return null. But for some reason the deliverResponse is not being called? How could reason why this can happen or how I could...

PATCH Verb in Android (OkHttp, Volley, Retrofit…)

android,android-volley,okhttp
I know a similar question has been asked a few times now, but I can't seem to find a solution for a simple problem: PATCH verb. So I ask anyone who as solved the PATCH issue in Android either by using OkHttp, Volley or Retrofit ( or if you used...

Waiting for JSON response before returning the function?

java,android,json,android-volley
Hi folks I'm creating an android application's login/register part using the Android Volley Library. My application was working well, but the UI and logic were at the same class. So, I have separated them into two classes. My app makes requests to my NodeJS server using POST methods and gets...

Android Volley Converting ArrayList to CharSequence Returning Empty

android,json,arraylist,android-volley,charsequence
In the onCreate method, I have a network operation that is to return JSON that is parsed into ArrayLists, to be set into a CharSequence[] array and used in an alert dialog. However, when selected, the alert does not populate with the resulting JSON data. Thus far, I know the...

Why do I get a socket time out?

android,eclipse,http,networking,android-volley
I am trying to access a remote service via Volley and I end up in the on error response function with the error: 02-26 10:29:53.491: D/MyApp(1592): java.net.SocketTimeoutException: failed to connect to 10.10.201.10 (port 443) after 5000ms I can access this IP from my browser and I can see the interface...

Android JSON parsing using Volley

android,json,gson,android-volley
Ok so an answer to my question suggested for Volley implementation. I did try some examples, read some articles and yeah I'm kinda excited about Volley, it can make my apps life easier. but there is not a lot of documentation out there and for I newbie like me, I...

Trying to call getApplicationContext() on instance of Application class leads to null object reference error

android,android-volley
I'm trying to do some networking in my Android app. The sequence of events that leads up to my error are as follows: In my fragment, I get a new instance of my VolleySingleton class if one does not already exist. public static VolleySingleton getInstance() { if (vInstance == null)...

How to parse JsonObject to List using gson

android,gson,android-volley
I need a list of objects and I'm having problems to get it. I'm pretty new using this so someone who can help me? I'm using volley to get a jsonObject and then I need convert it(I saw the best wa to do this is with gson). Below you can...

Android volley cancel request behavior

android,request,android-volley
I am using Android Volley lib in my project to execute network requests, all works very well but I have some troubles with the "cancel" feature of this lib. I explain my issue.. I've an activity, where I'm executing the request at OnCreate method, the request is called, no problem....

Android Volley too big string in JsonRequest

android,json,android-volley
I am using volley to send some pretty big JsonRequest, and when the Json object calls toString, I receive an java.lang.OutOfMemoryError. It is on Nexus 7 2013 Android 4.4 JsonRequest request = new JsonRequest<ResponseData>( method, url, EntryJsonObject.toString(), responseListener, errorListener) java.lang.OutOfMemoryError at java.lang.AbstractStringBuilder.enlargeBuffer(AbstractStringBuilder.java:94) at java.lang.AbstractStringBuilder.append0(AbstractStringBuilder.java:132) at java.lang.StringBuilder.append(StringBuilder.java:124) at...

JSON error: java.lang.String cannot be converted to JSONObject

php,android,json,gson,android-volley
I'm developing an android app and I'm trying to use Volley Library. The problem that I can't solve is about the JSON. I checked my php file, the result and the Java code but I'm still getting the same error. The interesting part is that VolleyLog doesn't show an error...

Android volley Timeout Exception when using RequestFuture.get()

java,android,network-programming,android-volley,future
In my Fragment, i am trying to use TMDB's open movie DB to get details about "Now Playing" Movies. If i use RequestFuture.get(time, TimeUnit) method to execute this volley request i always get a timeout error. If i manually test the same Url in Safari, i get the results instantaneously....

Android Volley : bad urls encoding

android,json,google-maps,google-maps-api-3,android-volley
I use Volley library for the requests executing. When I make simple requests for address geocoding to Google Maps v3 , I receive INVALID_REQUEST or 400 error. The problem occurs in urls like : http://maps.googleapis.com/maps/api/geocode/json?address=52072,Aachen-Horbach Gzg&region=DEU&sensor=false http://maps.googleapis.com/maps/api/geocode/json?address=362 35,Abertamy-Horní Blatná&region=ITA&sensor=false When I use the same urls with the Apache DefaultHttpClient, everything...

Google Volley Imageloader - Uncache a 302 redirect request or intercepting the redirect url

android,redirect,caching,android-volley,http-status-code-302
I have a set url (ex: http://mywebsite.com/cawn28xd/user_avatar) I call for imageloading that redirects to another link that may or may not be different. I want to be able to either intercept the 302 redirect and grab the url so the imageloader will not cache that specific url (This brings up...

Passing volley image as the next activity background image

android,json,android-layout,android-volley
It is a simple question but confuses me. i have first activity and details activity like below. First Activity Second Activity the first activity as a list view downloaded json data using volley, i'm able to send the title and image to the details activity, but now i want to...

Is volley library better or native HTTPClient for exchanging data with server? [closed]

android,http,android-volley
I am developing an app which exchange lot of data with server by making HTTP calls.Mostly data is text.So which approach should i follow for exchanging the data with server.I want to send & get data from server using POST request.

Losing images from NetworkImageView after Scrolling list up-down

android,android-listview,android-volley,networkimageview
I have a ListView that grabs news with images associated with it using Volley Json. At first it loads everything but when i scroll the list and come back, it sometimes shows images and sometimes not. After scrolling 2-3 times listview loses every image. Same procedure works perfectly with my...

Post JsonObject with Volley

android,json,parse.com,android-volley
I'm trying to send a Post request with volley without success. The lib is working correctly, and I manage to sent some string requests, but the Post with a JsonObject doesn't work. String urlJsonReq = "https://api.parse.com/1/classes/GameScore"; String tag_json_obj = "tag_json"; JsonObjectRequest jsonReq = new JsonObjectRequest(Request.Method.POST, urlJsonReq, new Response.Listener<JSONObject>() { @Override...

Callback function on Android

java,android,callback,android-volley
In java 8 there are the new Lambda functions and method references. Are there something similar on android? Using volley I need to pass a callback function to handle the onResponse, what's the best way to handle this?

Picasso requests with respect to success and error count does not match

android,progress-bar,android-volley,picasso
Below is sample code. The number of times the Picasso gets called is more than the number of times it reaches Success or OnError(). How can I deal with the ProgressBar in this situation? This happens , since i am invoking this method from the ArrayAdapter. How can I get...

Custom Volley Singleton throws NullPointerException?

android,android-volley
I have an application that I'm using Volley API. I'm trying create a Volley Singleton to execute my requests. To do it I created an ApplicationController that return request of json but when I try execute this ApplicationController the Singleton throws a NullPointerException and I can't understand why does throws...

Android: How to set the json data from Volley into the ListView?

android,json,android-volley
I've recently started to use volley and I have some problem that I find curious. I have a set of json data that I want to set within the list view . {"classification": [ {"1":"\u30b8\u30e3\u30f3\u30dc\u5b9d\u304f\u3058"}, {"2":"\u95a2\u6771\u30fb\u4e2d\u90e8\u30fb\u6771\u5317\u81ea\u6cbb\u5b9d\u304f\u3058"}, {"3":"\u8fd1\u757f\u5b9d\u304f\u3058"}, {"4":"\u897f\u65e5\u672c\u5b9d\u304f\u3058"} ], "result":"OK"} I want to display the values from the json data...

Null Object Reference Error: Android Studio using SQLite

android,sqlite,android-volley
So I'm trying to adapt this tutorial: http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/ to my own project. It is a basic register & login in Android/Java using SQLite & Volley to a SQL server via PHP. I can get the tutorial as written working no problem. However, upon transferring it to my project I encounter...

Error in Volley Patch

java,android,android-volley
com.android.volley.NoConnectionError: java.net.ProtocolException: Unknown method 'PATCH'; must be one of [OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE] StringRequest putRequest = new StringRequest(Request.Method.PATCH, url, new Response.Listener<String>() { @Override public void onResponse(String response) { Log.d("Response", response); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Log.d("Error.Response", error.toString()); } } ) {...

Android Json Parsing Using GSON

android,json,gson,android-volley
Iam using volley in my app for network requests.I am trying to use gson library for json parsing and create a list view with that.Json looks like this.When it try to iterate I get only null objects.What is wrong with this and what is missing { "header": { "count": 7,...

Android Volley Crashing

java,android,nullpointerexception,android-volley
I'm using Android Volley to login a user in but when addToRequestQueue is called the following crash report is shown. The login request is carried out onclick in the Loginactivity as follows: // Login button Click Event btnLogin.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { String username = inputUserName.getText().toString(); String...

Volley Request Queue NullPointerException

java,android,android-volley
I am trying to use the Volley library to query an xml api on the web with a search query provided by the user through a SearchWidget. Whenever I enter a search string, the app crashes with a NullPointerException on adding the StringRequest to the RequestQueue. Why is this happening?...