I am loading url in android webview using below code
webviewShowPost.loadUrl(URL);
I want to check if no data connectivity available then webview instead of showing blank view, I can display Toast of no connectivity.
Thanks
Please try this
webView.setWebViewClient(new WebViewClient() {
@Override
public void onReceivedError(WebView view, int errorCode,
String description, String failingUrl) {
// TODO Auto-generated method stub
super.onReceivedError(view, errorCode, description, failingUrl);
}
@Override
public void onPageFinished(WebView view, String url) {
// TODO Auto-generated method stub
super.onPageFinished(view, url);
}
});