Authorize button is disabled in Android WebView


I write Android app that will connect to using OAuth 2.0 and RESTful API but I failed when I tried to show the authorization form in my app in WebView , Authorize button is disabled and I can’t find reasons why. I enabled a support for JS, database and DOM Storage:

val webViewConfig: IWebViewConfig = object : IWebViewConfig {

    override fun onConfig(webView: WebView) {
        webView.settings.domStorageEnabled = true
        webView.settings.databaseEnabled = true
        webView.settings.javaScriptEnabled = true
        webView.settings.loadWithOverviewMode = true
        webView.settings.useWideViewPort = true
        webView.settings.allowContentAccess = true
        webView.settings.allowFileAccess = true
        webView.settings.allowFileAccessFromFileURLs = true
        webView.settings.allowUniversalAccessFromFileURLs = true
        webView.settings.userAgentString = "Android"


but the button still doesn’t work:  

What should I allow or setup to the button worked? I just don’t know where is problem already…

If you can reproduce this behavior in a desktop browser, we may be able to help diagnose the problem. Unfortunately, if the problem is due to some problem with the WebView itself, that’s not something we can help with.

Let us know if you can provide more information.

Hey @ghostman2013 I faced the same issue. 

Ohhh, it was amazing, I beleive I have found something …

  1. I didn’t manageg to make it working on emulator with API 22 and 23 (I didn’t try 24-27 though).

  2. It works well on emulator with API 28 and 29.

  3. On the real device Pixel 3 (API 29), the button was disabled initially and nothing was happening for a while. But when I taped the screen twice in random places it got enabled. Restartnig of the app reproduces the situation: intially disabled button --> tap on the screen --> button gets enabled.

Apparently some antifraud mechanism is involved.

But it gives kinda poor expeprience to the user. It looks like a bug in the app.

Would be awesome if it could be improved somehow …