Reputation: 317
In my android app i have used webview to load https url. Page contains mixed content (secure and unsecure). I receive onReceivedError()
with net::ERR_CONNECTION_TIMED_OUT statement.When i try connect to server by this url in a chrome, establishing connection take a lot of time (approximately 5 minutes) but succeeded.
How i can resolve this problem?
Or
How i can increase connection time of WebView?
function setMixedContentMode( WebSettings.MIXED_CONTENT_ALWAYS_ALLOW )
I have tried.
Upvotes: 1
Views: 2724
Reputation: 627
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
}
});
Upvotes: 1