Is it possible to check if Android WebView can reach the server or not? So if it can’t reach the server or a specific website it returns something like false or so? I’ve searched quite a lot and some people said you can use OnReceivedError() but that doesn’t work for some reason… So how can I check if the app can reach the given server (host address).
Share
This way worked for me: https://stackoverflow.com/q/2001824/446576
Don’t rely on webview errors, check connectivity instead.
To test a specific remote host, try to download a page with
HttpClient(see https://stackoverflow.com/q/4724491/446576)