Monday, 15 February 2010

php - jsonarray request with parameters -


I have a php web service that returns a json array json_encode (array ( "moviemakers" of = & gt using, $ lines

JSONObject jsonRequest, listener & lt; JSONArray & gt; listener, errorListener errorListener) {super (method, URL, (jsonRequest == null) null: jsonRequest.toString (), the listener, errorListener) ;?} extend

when I use it in your code, it generates an error Is anyone can guide me that the above snippet in my code Where is it?

An example here is a JsonObjectRequest:

  private void volleyRequest (string url) {final JsonObjectRequest request = new JsonObjectRequest (url, null, new Response.Listener & LT; JSONObject & gt; () {@Override public void onResponse (JSONObject response) {try {Log.i (LOG_FLAG , response.toString (4)); // parseJSON} catch (JSONException e) {// handle exception}}}, new Response.ErrorListener () {@Override public void onErrorResponse (VolleyError VolleyError) {// handle error}} ); // add application to queue appClass.getInstance (). AddToRequestQueue (Request, "someTag"); }  

Here you can find a great tutorial about volley:


No comments:

Post a Comment