Quantcast
Channel: VBForums - Mobile Development
Viewing all articles
Browse latest Browse all 96

unable to get response from web api in andrid appplication

$
0
0
i have below code in android application and its unable to get response
Code:

private void getWebServiceResponseData() {
      // Toast.makeText(getApplicationContext(),
            //    "*************************: " + path,
            //  Toast.LENGTH_LONG).show();
        JsonObjectRequest jsonObjectRequest = new JsonObjectRequest
                (Request.Method.GET, path, null, new Response.Listener<JSONObject>() {

                    @Override
                    public void onResponse(JSONObject response) {
                        Toast.makeText(getApplicationContext(),
                            "**********onResponse***************: " + path,
                          Toast.LENGTH_LONG).show();
                      //textView.setText("Response: " + response.toString());
                    }
                }, new Response.ErrorListener() {

                    @Override
                    public void onErrorResponse(VolleyError error) {
                        Toast.makeText(getApplicationContext(),
                                "onErrorResponse" + error,
                                Toast.LENGTH_LONG).show();

                    }
                });


        //  return null;
    }

though i check in postman its working fine

Viewing all articles
Browse latest Browse all 96

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>