Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean isInternetAvailable() {
- try {
- InetAddress ipAddr = InetAddress.getByName("google.com");
- if (ipAddr.equals("")) {
- return false;
- } else {
- return true;
- }
- } catch (Exception e) {
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement