You can bind this class to the JavaScript that runs in your WebView with addJavascriptInterface and name the interface Android For example. Apache Cordova library is an example of a middle-ware that enables.
This is called JavaScriptInterface With this class you can call Java methods run on Android application from JavaScript written on any. Of course if the webview also supports a javascript-to-java interface. Android App and Web App is like two different world but at times we still. A function object is retrieved from the specified property eg in your example. This function handles call from Android-Java JavascriptInterface public void. Nativescript-webview-interface npm.


Js in android webview javascript interface example
That are annotated with JavascriptInterface can be accessed from JavaScript.