this solution is for you
According to the documentation and my experience, it should work well. You just need to set WebClient with override onReceivedError method in WebView .
Here is a snippet from my old test application:
wvBrowser = (WebView) findViewById(R.id.Browser); wvBrowser.setWebViewClient(new WebViewClient() { @Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { Log.i("WEB_VIEW_TEST", "error code:" + errorCode); super.onReceivedError(view, errorCode, description, failingUrl); } });
I tested it and it works fine. Check your logs and see what code error you get.
all this can be found at http://developer.android.com/reference/android/webkit/WebView.html
Hope this helps.
source share