I need to implement timeout for my webviews. I want to show the user n error message if the webpage could not be loaded within a desirable time. Is there any way to do this?
Asked
Active
Viewed 8,016 times
2 Answers
2
See Android WebView TimeOut You basicly have a timer that checks the progress of the webview at some time intervals by calling getProgress(). If the progress hasen't reached your chosen threshold value after a specific time you call the error message.
Another answer: http://groups.google.com/group/android-developers/browse_thread/thread/04a817864dc86383

Community
- 1
- 1

David Olsson
- 8,085
- 3
- 30
- 38
0
You may use handler.postDelayed(Runnable r, int delayInMillisec)
method after webview.loadUrl()
or webview.loadDataWithBaseUrl()

basicsharp
- 446
- 3
- 8