Example usage for android.webkit WebViewClient ERROR_CONNECT

List of usage examples for android.webkit WebViewClient ERROR_CONNECT

Introduction

In this page you can find the example usage for android.webkit WebViewClient ERROR_CONNECT.

Prototype

int ERROR_CONNECT

To view the source code for android.webkit WebViewClient ERROR_CONNECT.

Click Source Link

Document

Failed to connect to the server

Usage

From source file:Main.java

private static boolean canRetryWebView(Context context, int errorCode, String description, String failingUrl) {
    if (errorCode == WebViewClient.ERROR_CONNECT || errorCode == WebViewClient.ERROR_FAILED_SSL_HANDSHAKE
            || errorCode == WebViewClient.ERROR_HOST_LOOKUP || errorCode == WebViewClient.ERROR_TIMEOUT) {
        return true;
    } else {/*from  w w w .  j a v a  2 s.c o m*/
        return false;
    }
}