WebView Support

Supporting Leap to run in screen containing web elements
Chrome tabs are not supported as it doesn't support javascript injection.
If you want Leap to run in the Activity/Fragment which contains WebView then you must add the following code:
Leap.enableWeb(yourWebViewInstance);
Make sure to call above before WebView loadUrl() method

WebView Scaling Support

If you have scaling enabled in your WebView make sure you send the new scale to Leap SDK. You can get the new scale value of the WebView by overriding onScaleChanged() method in your WebViewClient. You can refer to the below code:
Java
Kotlin
webViewInstance.setWebViewClient(new WebViewClient() {
@Override
public void onScaleChanged(WebView view, float oldScale, float newScale) {
super.onScaleChanged(view, oldScale, newScale);
//Required in LeapCreator to create the exp. in scaled WebView
LeapCreator.updateWebViewScale(newScale);
//Required in Leap to show the exp. in scaled WebView
Leap.updateWebViewScale(newScale);
}
});
webViewInstance.webViewClient = object : WebViewClient() {
override fun onScaleChanged(view: WebView, oldScale: Float, newScale: Float) {
super.onScaleChanged(view, oldScale, newScale)
//Required in LeapCreator to create the exp. in scaled WebView
LeapCreator.updateWebViewScale(newScale)
//Required in Leap to show the exp. in scaled WebView
Leap.updateWebViewScale(newScale)
}
}