Android: How to check if the server is available?

He probably needs Java code since he’s working on Android. The Java equivalent — which I believe works on Android — should be:

InetAddress.getByName(host).isReachable(timeOut)

Leave a Comment