Code example for ConsoleMessage

Methods: lineNumbermessagesourceId

0
		Log.i("app","start2");
		WebSettings webSettings = myWebView.getSettings();
		 
		myWebView.setWebChromeClient(new WebChromeClient() {
			  public boolean onConsoleMessage(ConsoleMessage cm) {
			    Log.d("app", cm.message() + " -- From line "
			                         + cm.lineNumber() + " of "
			                         + cm.sourceId() );
			    return true; 
			  } 
			}); 
		 
		 
 
		webSettings.setJavaScriptEnabled(true);
		Log.i("app","start");
		myWebView.addJavascriptInterface(new WebAppInterface(this), "Android");
		myWebView.loadUrl("file:///android_asset/www/index.html");
		new MessageThread().start();
	}