Accessing JuspayWebView from JuspayBrowserFragment

If you want to gain access to JuspayWebView, you can use the callback interface which is called as soon as webview is ready. To set it up you can follow this code snippet below:

JuspayWebviewCallback juspayWebviewCallback = new JuspayWebviewCallback() {
        @Override
        public void webviewReady() {
            JuspayWebView webView = browserFragment.getWebView();
            webView.setWebViewClient(new CustomWebViewClient());
        }
};

browserFragment.setupJuspayWebviewCallbackInterface(juspayWebviewCallback);

If you just want to use custom webview and webchrome client and don't need webview instance specifically, you can override the two methods below and return the appropriate client instances:

@Override
protected JuspayWebChromeClient newWebChromeClient() {
    return getCustomWebChromeClient(this);
}

@Override
protected JuspayWebViewClient newWebViewClient(JuspayWebView juspayWebView) {
    return getCustomWebViewClient(juspayWebView, this);
}

results matching ""

    No results matching ""