I have an Android Webview application. How do I "transfer" the text entered into the html web page, e.g to a textfield, after the user click the "submit" button on the html web page, so that my Android native code can process the tex开发者_开发问答t ? Can it be done using javascript in the html code? I have looked at addJavaScriptInterface method in the WebView but I'm not sure if it's what I'm looking for.
Looks like it is unsafe to give such possibility to developers because they could steal some user authentication data with such ability. But you can give to JS ability to notify about data using addJavascriptInterface method http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface%28java.lang.Object,%20java.lang.String%29
精彩评论