Code example for NetworkInfo.State

Methods: toString

0
            Log.v(LOG_TAG, "no broadcast is expected, instead broadcast is probably received");
            mReason = "no broadcast is expected, instead broadcast is probably received";
            return false; 
        } else if (mStateDepository.get(0) != mTransitionTarget) {
            Log.v(LOG_TAG, String.format("%s is expected, but it is %s",
                    mTransitionTarget.toString(),
                    mStateDepository.get(0).toString()));
            mReason = String.format("%s is expected, but it is %s",
                    mTransitionTarget.toString(),
                    mStateDepository.get(0).toString());
            return false; 
        } 
        return true; 
    } 
 
    /** 
     * Verify the network state to disconnection 
     * @return false if any of the state transitions were not valid 
     */ 
    private boolean validateNetworkDisconnection() { 
Connect your IDE to all the code out there  Get Codota for Java