Volley Timeout Error

前端 未结 13 1131
清歌不尽
清歌不尽 2020-12-01 14:31

I am trying to hit a rest service using Volley.

public class AuthFunctions {
    private static final String LOGIN_URL = \"http://10.0.2.2:8080/stewayservic         


        
13条回答
  •  天涯浪人
    2020-12-01 15:00

    public void onErrorResponse(VolleyError error) {
                    if (error instanceof NetworkError) {
                    } else if (error instanceof ServerError) {
                    } else if (error instanceof AuthFailureError) {
                    } else if (error instanceof ParseError) {
                    } else if (error instanceof NoConnectionError) {
                    } else if (error instanceof TimeoutError) {
                        Toast.makeText(getContext(),
                                "Oops. Timeout error!",
                                Toast.LENGTH_LONG).show();
                    }
    

提交回复
热议问题