Code example for ConsoleMessage

Methods: lineNumber, message, sourceId

0
        // } 
        // }); 
        mWebView.setWebChromeClient(new WebChromeClient() {
            @Override 
            public boolean onConsoleMessage(ConsoleMessage cm) {
                Log.d("D", cm.message() + " " + cm.sourceId() + ":" + cm.lineNumber());
                return true; 
            } 
        }); 
 
        // mWebView.loadUrl("file:///android_asset/index.html"); 
        mWebView.loadUrl("http://192.168.1.101:8000/index.html");
 
    } 
}