Google OAuth is failed with javascript disabled error in my android app's web view

34
September 11, 2019, at 10:40 AM

I am developing an android app using the google drive API.

To use this, google OAuth auth is needed.

So I provide a web view.

When user input id/pw and click 'allow' button, it should be moved to our native app's activity.

Actually, it works fine.

But sometimes it shows an error page with the message:

You've reached this page because we have detected that Javascript is disabled in your browser

It happens very very rarely.

Here are my webview settings:

webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setAppCachePath(getActivity().getCacheDir().getAbsolutePath());
webview.getSettings().setAllowFileAccess(true);
webview.getSettings().setAppCacheEnabled(true);
webview.getSettings().setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
webview.getSettings().setUserAgentString("Chrome/56.0.0.0 Mobile");

You know, I already set "javascriptEnabled: true".

But I don't know why the error message is shown...

The target android version is "Kitkat".

Actually, this app is only for specific HW (Kitkat based). So I don't run it on other various versions of Devices. But I ran it on Oreo tablet for development too. And I have never seen this error on "Oreo" tablet.

Can it be the bug of "Kitkat"?

READ ALSO
load content from one php page in another

load content from one php page in another

I have three PHP pages indexphp, fetch_data

13
BackBone JS rendering multiple views performance issues

BackBone JS rendering multiple views performance issues

I have a single page which is implemented using backboneThere are a minimum of 1000 views for the page

34
jQuery fade in and animate at the same time on document ready

jQuery fade in and animate at the same time on document ready

I have a modal popup that I'm trying to get to fade in and animate at the same time when the document is ready but I can't get it to functionI can fadeIn just fine:

31
Is it possible to pass raw video frame TO a browser?

Is it possible to pass raw video frame TO a browser?

Is possible to pipe raw video frames to a browser/website? For instance the decoding could be done locally in Gstreamer, and then that could be forwarded somehow to a browser

43