• 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
  • Unable to Log In with Existing Mobile Number in User Profile
  • Account Kit Server URLs are not getting saved
Categories
  • Addons
  • Common Errors
  • Gateway Setup
  • Getting Started
  • How To
  • Page/Popup Builder
  • Social Login

  Account Kit Server URLs are not getting saved

    • Made with ❤ by Humans on 🌎