0

I am trying to load a website in my android app using webview, but the webview does is not rendering the website.

The website is https://www.rbsdigital.com/

The webview that I'm using is from this github project .

The logs that I get is:

10-12 19:57:14.188 1041-1041/com.teknorial.webviewapp I/chromium: [INFO:CONSOLE(0)] "'window.webkitStorageInfo' is deprecated. Please use 'navigator.webkitTemporaryStorage' or 'navigator.webkitPersistentStorage' instead.", source:  (0)
10-12 19:57:14.189 1041-1041/com.teknorial.webviewapp I/chromium: [INFO:CONSOLE(0)] "'webkitIndexedDB' is deprecated. Please use 'indexedDB' instead.", source:  (0)

Here's my code. From the github project.

private WebView view; 
private static final String RBS_URL = "https://www.rbsdigital.com/";

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    view = (WebView) this.findViewById(R.id.webView);

    view.getSettings().setJavaScriptEnabled(true);
    view.setWebViewClient(new MyBrowser());
    view.getSettings().setLoadWithOverviewMode(true);
    view.getSettings().setUseWideViewPort(true);
    view.setWebChromeClient(new WebChromeClient());
    view.loadUrl(RBS_URL);
}

private class MyBrowser extends WebViewClient {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);
        return true;
    }
}

Now if I use the default webview like the one from this.

WebView myWebView = (WebView) findViewById(R.id.webview);
myWebView.loadUrl("https://www.rbsdigital.com/");

The app loads the browser instead of rendering the website from the webview.

If Android webview does not support the website, is it possible to load this by any means?

Aaron
  • 2,591
  • 4
  • 27
  • 45

1 Answers1

0

try this line of code for getting rid of deprecated!

navigator.webkitTemporaryStorage.queryUsageAndQuota ( 
function(usedBytes, grantedBytes) {  
    console.log('we are using ', usedBytes, ' of ', grantedBytes, 'bytes');
}, 
function(e) { console.log('Error', e);  });

read this answer I hope it will work fine!

Community
  • 1
  • 1
Al Walid Ashik
  • 1,545
  • 20
  • 32