![](/img/trans.png)
[英]android WebView fail to load a webpage that protected by Cloudflare
[英]Android Webview fail load mixed page
在我的Android應用程序中,我已經使用webview加載https url。 頁面包含混合內容(安全和不安全)。 我收到帶有net :: ERR_CONNECTION_TIMED_OUT語句的onReceivedError()
。 當我嘗試在Chrome中通過此url連接到服務器時,建立連接需要很多時間(大約5分鍾),但成功。
我該如何解決這個問題? 或者如何增加WebView的連接時間? 我嘗試過的function setMixedContentMode( WebSettings.MIXED_CONTENT_ALWAYS_ALLOW )
。
WebView wv = (WebView) findViewById(R.id.webView);
wv.setWebViewClient(new WebViewClient() {
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
super.onReceivedError(view, errorCode, description, failingUrl);
// do your stuff here
}
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.