• HOME
  • KNOWLEDGE BASE
  • FAQ
  • CONTACT US
  • HOME
  • KNOWLEDGE BASE
  • FAQ
  • CONTACT US
home/Knowledge Base/Common Errors/Account Kit popup not working in Webview Apps

Account Kit popup not working in Webview Apps

In webview apps generally popups are disabled, so to make Account Kit work on those platforms you’ll have to enable popups in webview by just adding the below simple code to your application

webView.getSettings().setSupportMultipleWindows(true);

webView.setWebChromeClient(new WebChromeClient() {
@Override
public boolean onCreateWindow(WebView view, boolean isDialog,
boolean isUserGesture, Message resultMsg) {

WebView popupView = new WebView(WebpageActivity.this);
popupView.getSettings().setJavaScriptEnabled(true);
popupView.getSettings().setPluginState(PluginState.ON);
popupView.getSettings().setSupportMultipleWindows(true);
view.addView(popupView);
WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj;
transport.setWebView(popupView);
resultMsg.sendToTarget();

popupView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
});
return true;
}
}

});

Was this helpful?

2 Yes  6 No
Common Errors
  • Account Kit popup not working in Webview Apps
  • Not able to login even when user mobile number is present in profile
  • Account Kit Server URL’s not getting saved
Categories
  • Addons
  • Common Errors
  • Gateway Setup
  • Getting Started
  • How To
  • Page/Popup Builder

  Account Kit Server URL’s not getting saved

    • Made with ❤ by Humans on 🌎