i have below code in android application and its unable to get response
though i check in postman its working fine
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;
}