I want to change the page "Web page is not available." That in the absence of connection my html file (noconnect.htm) would open. How to implement it?

    1 answer 1

    For example :

    WebView mWebView; ... mWebView.setWebViewClient(new WebViewClient() { public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { mWebView.loadUrl("file:///android_asset/myerrorpage.html"); } }); 

    The loadUrl(...) is the path to the page you want to display.

    • one
      I want to note that onReceivedError behaves very strangely and by 60% the standard screen still shows for a split second. - Flippy