I’m running an android app that displays a webview on specific URL, I want to check if the application server I’m accessing is alive and that I can view HTML, if failed I should terminate the webview, this check should be every 10 seconds (or whatever), what is the best approach for this ?
Share
Create Timer (here you have information) and when timer tick, ping any host :
If return true : connection is active. Else isn’t active.