I am using a WebView in my app along with a WebChromeClient
. Because of the functionality of my app, I need to use WebChromeClient
. The only problem is that I've recently got this Log cat message:
I/chromium: [INFO:CONSOLE(0)] "The certificate used to load https://m.ebay.co.uk/itm/Dyson-V8-Absolute-Cordless-Vacuum-Cleaner-Refurbished-1-Year-Guarantee/122338999774?NAV=HOME uses an SSL certificate that will be distrusted in the future. Once distrusted, users will be prevented from loading this resource. See https://g.co/chrome/symantecpkicerts for more information.", source: https://m.ebay.co.uk/itm/Dyson-V8-Absolute-Cordless-Vacuum-Cleaner-Refurbished-1-Year-Guarantee/122338999774?NAV=HOME (0)
Initially, the WebView loads perfectly. However, if I try to reload the page, the page only loads up to about 80-95% then stops loading and never finishes. When I restart the app, the WebView loads the URL fine again, but if I try to reload the page, I get the same issue where it doesn't fully load.
The only way for me to get rid of this error is to force my app to restart
using System.exit(0);
before I want to reload the WebView's page. However, this causes a black screen to come up for a second which I want to avoid.
webView.setWebChromeClient(new WebClient());
WebSettings set = webView.getSettings();
set.setAllowContentAccess(true);
set.setAllowFileAccess(true);
set.setDatabaseEnabled(true);
set.setDomStorageEnabled(true);
set.setJavaScriptEnabled(true);
set.setBuiltInZoomControls(true);
webView.loadUrl(url);