Code example for NetworkInfo

Methods: getState, getType, getTypeName, isConnected

0
Boolean connectivity = !aIntent.getBooleanExtra( ConnectivityManager.EXTRA_NO_CONNECTIVITY, false );
		NetworkInfo netInfo = aIntent.getParcelableExtra( ConnectivityManager.EXTRA_NETWORK_INFO ); 
		 
		Log.i( WazeLog.TAG( "ConnEventReceiver" ), "Received event: " + aIntent.getAction() + ". Connectivity: " + connectivity + 
				". Type: " + netInfo.getTypeName() + " ( " + netInfo.getType() + " )" + 
				". State: " + netInfo.getState().toString() + 
				". Connected: " + netInfo.isConnected() );
		 
		FreeMapNativeManager mgr = FreeMapAppService.getNativeManager();
		 
		if ( mgr != null )
			mgr.ConnectivityChanged( netInfo.isConnected(), netInfo.getType(),  netInfo.getTypeName() );
		 
	} 
 
	 
	/************************************************************************************************* 
     *================================= Private interface section ================================= 
     */