/ Published in: Java
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
WebViewwebView=(WebView)findViewById(R.id.web_view); WebSettingssettings=webView.getSettings(); settings.setJavaScriptEnabled(true); settings.setDomStorageEnabled(true); settings.setDatabasePath("/data/data/my.package/folder"); webView.setWebChromeClient(newWebChromeClient() {@OverridepublicbooleanonConsoleMessage(ConsoleMessagemsg){ //pipethistoLogCat }}); webView.addJavascriptInterface(newMyInterface(),"zorro"); webView.loadUrl("javascript:tarzan.start()");
URL: http://www.slideshare.net/mobile/michael.galpin/android-lessons-you-wont-learn-in-school