My application opens a web view to show HTML page, which is hosted with HTTPS contains one image(image coming from http). On some devices image is not showing but for all other devices its working fine. I checked with multiple devices like Nexus, Samsung s6/s4, Moto G2 and others. Only on Samsung S4/S6, nexus image is not showing. but for all other devices its working fine. Even i tried with WI-FI, data carrier, and multiple OS versions but no luck.
Please help to solve this.
some observations:-
1) On each device i am getting same warning :- [blocked] The page at 'page url' was loaded over HTTPS, but displayed insecure content from 'image source': this content should also be loaded over HTTPS.
2) same page if i am opening in web browser, working fine on all devices.
My Code
mWebView = (WebView) findViewById(R.id.m_web_view);
WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
mainUrl = bean.getUrl();
mWebView.loadUrl("javascript:window.location.reload( true )");
mWebView.loadUrl(mainUrl);
mWebView.setWebViewClient(new myWebClient());
private class myWebClient extends WebViewClient {
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
//some code
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
//some code
}
@Override
public void onReceivedSslError(WebView view, SslErrorHandler handler,
SslError error) {
handler.proceed();
}
}