I got a AsyncTask that is supposed to check the network access to a host name. But the doInBackground() is never timed out. Anyone have a clue?
AsyncTask
doInBackground()
Best approach:
public static boolean isOnline() { try { InetAddress.getByName("google.com").isReachable(3); return true; } catch (UnknownHostException e){ return false; } catch (IOException e){ return false; } }