android-volley

Using custom Volley POST doesn't return anything

别等时光非礼了梦想. 提交于 2020-01-06 01:55:49
问题 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

Login to twitter always goes to callback failure method

冷暖自知 提交于 2020-01-05 01:17:24
问题 No errors showing but when the button is clicked, it always goes to callback the failure method.Internet is active and the keys are valid. I used debugger to see the following result:- E/Twitter: Invalid json: <?xml version="1.0" encoding="UTF-8"?> <hash> <error>Desktop applications only support the oauth_callback value 'oob'</error> <request>/oauth/request_token</request> </hash> com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at

Empty Response Received on Android POST Request

☆樱花仙子☆ 提交于 2020-01-04 17:13:37
问题 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> params = new HashMap<String, String>(); params.put("email", "nifras.personal@gmail.com"); params.put("password", "123456"); JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, urlJsonObj,

Empty Response Received on Android POST Request

人盡茶涼 提交于 2020-01-04 17:13:09
问题 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> params = new HashMap<String, String>(); params.put("email", "nifras.personal@gmail.com"); params.put("password", "123456"); JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST, urlJsonObj,

Android Volley JsonObjectRequest returns same response every time on mobile data

烂漫一生 提交于 2020-01-03 12:36:28
问题 I am using Volley JsonObjectRequest to get data from server. code snippet: JsonObjectRequest jsObjRequest = new JsonObjectRequest (Request.Method.GET, url, null, new Response.Listener<JSONObject>() { @Override public void onResponse(JSONObject response) { System.out.println("Response: " + response.toString()); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { // TODO Auto-generated method stub } }); But I am getting same JSONObject response every

WebAPI call using volley

时光怂恿深爱的人放手 提交于 2020-01-03 11:37:08
问题 I'm trying to get access tokens from the server using a volley String request. I have tried making a JsonObjectRequest also. Both are below. public void getAuthenticationTokens(Object param1, final CustomListener<String> listener) { //String url = prefixURL + "this/request/suffix"; String url = "https://lw.xxx.co.uk/connect/token"; StringRequest request = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() { @Override public void onResponse(String response) { //

Adding an Application controller to android project?

我们两清 提交于 2020-01-02 11:24:21
问题 Following a volley android tutorial I am trying to figure out how to get it to work, it keeps crashing. I don't think I included the Application class correctly. http://arnab.ch/blog/2013/08/asynchronous-http-requests-in-android-using-volley/ I am not getting any errors, but the app is crashing, I need to inspect logcat further, but I am asking if the code is implemented correctly. app/java/co.mystuff.CoolApp/MainActivity.java package co.mystuff.CoolApp; import android.support.v7.app

Adding an Application controller to android project?

夙愿已清 提交于 2020-01-02 11:22:32
问题 Following a volley android tutorial I am trying to figure out how to get it to work, it keeps crashing. I don't think I included the Application class correctly. http://arnab.ch/blog/2013/08/asynchronous-http-requests-in-android-using-volley/ I am not getting any errors, but the app is crashing, I need to inspect logcat further, but I am asking if the code is implemented correctly. app/java/co.mystuff.CoolApp/MainActivity.java package co.mystuff.CoolApp; import android.support.v7.app

Getting invalid status line 10380HTTP/1.1 200 OK

耗尽温柔 提交于 2020-01-02 09:51:26
问题 It's driving me crazy. I created an Android App that does REST requests to an Apache Server running CakePHP 2.X. In Android side: the request are make using Volley from Google it's HEAD version. In Server side: It's a Apache 2, PHP 5.4, CakePHP 2.x and SSL. Whatever request method GET or POST, with the same URL or same parameters when POST, sometimes the response is fine others time I get com.android.volley.NoConnectionError: java.net.ProtocolException: Unexpected status line: 10380HTTP/1.1

How to intent SharedPreferences into next activity value using PostResponseAsyncTask in Android Studio?

梦想的初衷 提交于 2020-01-02 07:29:15
问题 my question is the extension of this question here but in this question I added two function which are : SharedPreferences Remember me function (Checkbox) Currently, I managed to login with/without remember me checkbox and intent the rest of the JSON Object fetch from mysql database. But the problem is inside LoginActivity.java PART A block . When I restart/rebuild the apps, the intent data is null which is not stored and sent into next activity. The data could not be stored and sent into