(A demonstration example of Android interacting with Js, for example, to obtain browser components when interacting with JavaScript// WebView is a simple browser.//The source code of Android browser exists in LINUX/android/package/apps/Browser.//All operations in the browser are opened around WebView.//WebSettings Almost all browser settings are made in this class. DemoJavaScript Interface class provides an interface for js to call Android server
android is called by js as the client interface of DemoJavaScript Interface class
The specific method to call is defined in DemoJavaScript Interface:
For example, clickOnAndroid in this instance inherits the WebChromeClient class
In the three methods of this class, Android built-in controls are used to rewrite the corresponding dialog boxes in Js, that is, to manage the dialog boxes in js is to rewrite them. This document includes the following annexes:)