1

I have used webview to show wordpress site in an android app. Everything works fine except when a user logs in the dropdown values seems to not load and the dropdowns show up empty without any values. Its only happening in webview after user logs in. In normal browser mobile view its showing up fine while user is logged in or not. The webview shows up fine when the user is not logged in, the problem is showing up when the user logs in. My site is in wordpress.

Am I missing something here?

1 Answers1

0

Do you have JavaScript support enabled for WebView? Maybe it doesn't work?

Try to enable this for your WebView:

yourWebViewFieldName.settings.javaScriptEnabled = true

Perhaps this article will help you.

kirkadev
  • 355
  • 4
  • 10
  • WebSettings settings = web.getSettings(); settings.setJavaScriptEnabled(true); have this in my code – Abhinav Banerjee Aug 26 '21 at 11:42
  • As i have mentioned it works fine when user is not logged in, it only poses a problem with the dropdown when user logs in. – Abhinav Banerjee Aug 26 '21 at 11:52
  • The answer is setDomStorageEnabled(true) https://stackoverflow.com/questions/7548172/javascript-not-working-in-android-webview Found the answer here sorry for the inconvenience caused. – Abhinav Banerjee Aug 26 '21 at 12:14