Custom Web Clients
Since the WebView is now encapsulated by the JuspayBrowserFragment class, it gets little tricky to have control over the WebView. The WebView is manipulated by our library using the WebViewClient and WebChromeClient. To achieve this we have extended these two classes to include our logic.
In order to be able to have your logic in place (for methods like onPageStarted and onPageFinished), you will have to extend JuspayWebViewClient and JuspayWebChromeClient. However, please make sure to pass the call up (by calling on super.) on all occasions.
public class CustomWebViewClient extends JuspayWebViewClient {
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
}
}
class MyWebChromeClient extends JuspayWebChromeClient {
// overrides
}