Code example for WifiConfiguration

0
		 * for (int i = 0; i<listConfig.size(); i++){ tmpConfig = 
		 * listConfig.get(i); if (tmpConfig.BSSID.equalsIgnoreCase(mac)){ return 
		 * wifi.enableNetwork(tmpConfig.networkId, true); } } 
		 */ 
 
		tmpConfig = new WifiConfiguration();
		tmpConfig.BSSID = mac;
		tmpConfig.SSID = ssid;
		tmpConfig.SSID = "\"".concat(ssid).concat("\"");;
		 
		tmpConfig.priority = 40;
		tmpConfig.hiddenSSID = false;
		// NUR WPA: 
		tmpConfig.allowedProtocols.set(WifiConfiguration.Protocol.RSN);
		tmpConfig.allowedProtocols.set(WifiConfiguration.Protocol.WPA);
		tmpConfig.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
		tmpConfig.allowedPairwiseCiphers
				.set(WifiConfiguration.PairwiseCipher.CCMP);
		tmpConfig.allowedPairwiseCiphers
				.set(WifiConfiguration.PairwiseCipher.TKIP);
Contextual code suggestions in your IDE  Get Codota for Java