Code example for ConnectivityManager

Methods: getNetworkInfo

0
	 */ 
	public static void initialCheck(Context context) {
		ConnectivityManager connectivityManager = (ConnectivityManager) context
				.getSystemService(Context.CONNECTIVITY_SERVICE);
		 
		mWifiConnected = connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI)
				.getState() == State.CONNECTED;
		 
		mMobileConnected = connectivityManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE)
				.getState() == State.CONNECTED;
	} 
	 
	// OVERRIDDEN ================================================================================= 
	 
	/** 
	 * <i>Overridden for internal use!</i> 
	 */ 
	@Override 
	public void onReceive(Context context, Intent intent) {
		boolean changed = false;