2

Im trying to connect with localhost using my Samsung. I use Volley to make the post request.

Following is my url string.

public static final String requestUrl = "http://10.0.2.2/export/mobileapi.php"

I have of course set the timeout value as follows,

private void setRetryCount(JsonObjectRequest jsonObjectRequest) {
        jsonObjectRequest.setRetryPolicy(new RetryPolicy() {
            @Override
            public int getCurrentTimeout() {
                return 50000;
            }

            @Override
            public int getCurrentRetryCount() {
                return 50000;
            }

            @Override
            public void retry(VolleyError error) throws VolleyError {

            }
        });
    }

But still Im getting time out error

0 Answers0