Code example for ConsoleMessage

Methods: lineNumbermessagesourceId

0
		webSettings.setDatabaseEnabled(true);
		webSettings.setDatabasePath("/data/data/"+getPackageName()+"/databases");
		webSettings.setDomStorageEnabled(true);
		myWebView.setWebChromeClient(new WebChromeClient() {
			  public boolean onConsoleMessage(ConsoleMessage cm) {
			    Log.d("MyApplication", cm.message() + " -- From line "
			                         + cm.lineNumber() + " of "
			                         + cm.sourceId() );
			    return true; 
			  } 
			}); 
		myWebView.loadUrl("file:///android_asset/www/index.html");
	} 
 
	@Override 
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present. 
		getMenuInflater().inflate(R.menu.main_activity, menu);
		return true; 
	} 
Connect your IDE to all the code out there  Get Codota for Java