Tech Droid: Android WebView, Javascript and CSS - 5 views
-
Calling a Javascript method from your Java code: webView.loadUrl("javascript:jsToggle()"); Calling a Java method from Javascript: window.jsinterface.nativeToggle(); /* // Before using the above code, you have to inject the interface object which // has a name "jsinterface" webView.addJavascriptInterface(jsInterface, "jsinterface"); */
-
Vincent Tsao on 10 Nov 10useful tips
-
Simon Pan on 09 Dec 10Is it use to auto-fill the form on WebView?
-
Vincent Tsao on 09 Dec 10JSInterface lets you bind Java objects into the WebView so they can be controlled from the web pages JavaScript, which means we can do anything to the content from webview via javascript interface, like what we can do with the html DOM content with javascrpit
-
Simon Pan on 09 Dec 10So, Can I retain username and password by this manner?
-
Vincent Tsao on 09 Dec 10i think so, you can fill form field with jsinterface
-
Simon Pan on 09 Dec 10thank you...go on together
-