Results 1 to 2 of 2

Thread: unable to get response from web api in andrid appplication

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2019
    Posts
    7

    unable to get response from web api in andrid appplication

    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

  2. #2
    New Member
    Join Date
    Nov 2020
    Location
    India
    Posts
    3

    Re: unable to get response from web api in andrid appplication

    hii,

    please use this- one- Fast-Android-Networking ,

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width