Time out error volley

有些话、适合烂在心里 提交于 2020-01-14 14:50:10

问题


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

来源:https://stackoverflow.com/questions/35889178/time-out-error-volley

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!