Code example for WebViewClient

Methods: onReceivedError

0
 
        webView.loadData(
                "error occured during load " + failingUrl + " : " + description,
                HTTP.PLAIN_TEXT_TYPE,
                HTTP.UTF_8);
        webViewClient.onReceivedError(view, errorCode, description, failingUrl);
    } 
 
    @Override 
    public void onPageFinished(WebView view, String url) {
        // for measuring loading time 
        Log.d("DEBUG", url + " : " + String.valueOf(System.currentTimeMillis() - measureStartMillis));
        measureStartMillis = 0;
 
        webViewClient.onPageFinished(view, url);
    } 
 
    @Override 
    public void onLoadResource(WebView view, String url) {
        webViewClient.onLoadResource(view, url);
    }