Code example for NetworkInfo.State

Methods: equals

0
        }  
        if (conMan.getNetworkInfo(ConnectivityManager.TYPE_MOBILE) != null) {
        	mobile = conMan.getNetworkInfo(ConnectivityManager.TYPE_MOBILE).getState();  
        } 
         
        return (wifi.equals(State.CONNECTED) || mobile.equals(State.CONNECTED));
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java