》WebView控件:WebViewClient或者WebChromeClient。
拦截URL请求,可以去请求网页,也可以进行其他处理(拼接参数 ,然后将参数拿出来)
> WebView: A View that displays web pages. This class is the basis upon which you can roll your own web browser or simply display some online content within your Activity. It uses the WebKit rendering engine to display web pages and includes methods to navigate forward and backward through a history, zoom in and out, perform text searches and more.
> However, you shouldn't develop an Android app simply as a means to view your web site. Rather, the web pages you embed in your Android app should be designed especially for that environment. You can even define an interface between your Android application and your web pages that allows JavaScript in the web pages to call upon APIs in your Android application—providing Android APIs to your web-based application.
> 实现Java和js交互十分便捷。通常只需要以下几步(属于JS只有少数的几个,对于变动的以及很多的情况下不适合)
- WebView开启JavaScript脚本执行
- WebView设置供JavaScript调用的交互接口。
- 客户端和网页端编写调用对方的代码。
- <还在继续研究>