Is there a way to set the timeout value in WebView? I want the WebView to be time-outed if the url is too slow to response or if the site doesn’t load in 10 seconds.
I don’t know really where I should start 🙁
I have 2 classes, the first one is starter and the second one is for webView. Starter is a kind of thread and splash-screen for start and the next activity is the main webView, so I would like to add a checker if the site doesn’t response in 4 10 secs, it would give a error.
I hope any of you can help me,
Darpans code will not work, not at least because the parameter progress will not change during
while, only by next call of. Try this instead:Unfortunately this will only work if the connection to the server will be established. If not the
onProgressChangedget called only two times: at 10 and at 100 percents when then load is aborted.