Testing for Java Objects Exposed Through WebViews
The following example shows how
In Android 4.2 (API level 17) and above, an annotation
This is how you can call the method
var result = window.Android.returnString();
- If necessary for legacy reasons (e.g. having to support older devices), at least set the minimal API level to 17 in the manifest file of the app (
<uses-sdk android:minSdkVersion="17" />).