Code example for ConsoleMessage

Methods: lineNumbermessagesourceId

0
		webView.getSettings().setJavaScriptEnabled(true);
		webView.setWebChromeClient(new WebChromeClient() { // Purely for
															// debugging. 
			public boolean onConsoleMessage(ConsoleMessage msg) {
				Log.d(TAG,
						"console: " + msg.message() + " at " + msg.sourceId()
								+ ":" + msg.lineNumber());
				return false; 
			} 
		}); 
		webView.setWebViewClient(new WebViewClient() { // Purely for debugging.
			public void onReceivedError(WebView view, int errorCode,
					String description, String failingUrl) {
				Log.e(TAG, "JS error: " + errorCode + " in " + failingUrl
						+ ", desc: " + description);
			} 
		}); 
		proxyingMessageHandler = new ProxyingMessageHandler(activity, handler);
		webView.addJavascriptInterface(proxyingMessageHandler,
				"androidMessageHandler"); 
Connect your IDE to all the code out there  Get Codota for Java