Code example for WifiInfo

Methods: getNetworkId

0
		 
		// Determine the current network access 
		WifiManager wifiMgr = (WifiManager) contextP.getSystemService(Context.WIFI_SERVICE);
		boolean wifiOn = wifiMgr.isWifiEnabled();
		final WifiInfo currentWifi = wifiMgr.getConnectionInfo();
		final boolean wifiConnected = (wifiOn && currentWifi.getNetworkId() != -1);
		final boolean DEBUG = debug;
		 
		// Create the servers list 
		final ArrayList<SynoServer> result = new ArrayList<SynoServer>();
		processLoadingServers(sharedPreferencesP, new PreferenceProcessor() {
			public void process(int idP, String keyP, Properties propertiesP) {
				try { 
 
					SynoServerConnection loc = SynoServerConnection.createFromProperties(true, propertiesP, DEBUG);
					SynoServerConnection pub = SynoServerConnection.createFromProperties(false, propertiesP, DEBUG);
 
					SynoServer server = new SynoServer(propertiesP.getProperty(PreferenceFacade.NICKNAME_SUFFIX), loc, pub, propertiesP.getProperty(PreferenceFacade.USER_SUFFIX), propertiesP.getProperty(PreferenceFacade.PASSWORD_SUFFIX), DEBUG, autoDetect, keyP);
					// DSM version 
					DSMVersion vers = DSMVersion.titleOf(propertiesP.getProperty(PreferenceFacade.DSM_SUFFIX));
					if (vers == null) {