1

I am developing an Android application which requires me to load a third-party website https://mmmoffice.com/. I am using webview to load this URL and the problem i'm facing is that, the captcha image from this webpage is not showing. If i open the same URL from the normal android browser, or google chrome browser, or firefox browser or UC browser, they all work well and the captcha image is shown. But its not showing in my webview. Please i need help. I have read lots of article on stackoverflow and google, but none helped. Below is my code:

WebView webView = (WebView)findViewById(R.id.webMain);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("https://mmmoffice.com");

1 Answer 1

7

I create a project with your code to check your issue. You are getting

 I/chromium: [INFO:CONSOLE(3)] "Uncaught TypeError: Cannot read property 'each' of null", source: https://ajax.cloudflare.com/cdn-cgi/nexp/dok3v=088620b277/cloudflare.min.js (3)
 I/chromium: [INFO:CONSOLE(5)] "Uncaught TypeError: Cannot read property 'getItem' of null", source: https://mmmoffice.com/js/storage.js?v=1 (5)

When webview is trying to load captcha.

Just add settings.setDomStorageEnabled(true);. Your final code should looks like:

    WebView webView = (WebView) findViewById(R.id.webview);
    webView.getSettings().setJavaScriptEnabled(true);
    WebSettings settings = webView.getSettings();
    settings.setDomStorageEnabled(true);
    webView.loadUrl("https://mmmoffice.com/");

Hope this helps!!

Sign up to request clarification or add additional context in comments.

1 Comment

Not working, still it says "Please upgrade your browser"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.