Java Code Examples for android.webkit.WebViewClient#ERROR_CONNECT

The following examples show how to use android.webkit.WebViewClient#ERROR_CONNECT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseWebActivity.java    From qrcode_android with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void onWebViewReceivedError(WebView view, int errorCode, CharSequence description, String failingUrl) {
    Log.i("0000", "errorCode:   " + errorCode);
    switch (errorCode) {
        case WebViewClient.ERROR_CONNECT:
        case WebViewClient.ERROR_TIMEOUT:
        case WebViewClient.ERROR_HOST_LOOKUP:
        case WebViewClient.ERROR_BAD_URL:
            showErrorHint(failingUrl);
            break;
    }
}
 
Example 2
Source File: BaseWebActivity.java    From QRScanner with GNU Lesser General Public License v3.0 5 votes vote down vote up
public void onWebViewReceivedError(WebView view, int errorCode, CharSequence description, String failingUrl) {
    Log.i("0000", "errorCode:   " + errorCode);
    switch (errorCode) {
        case WebViewClient.ERROR_CONNECT:
        case WebViewClient.ERROR_TIMEOUT:
        case WebViewClient.ERROR_HOST_LOOKUP:
        case WebViewClient.ERROR_BAD_URL:
            showErrorHint(failingUrl);
            break;
    }
}