Code example for WifiConfiguration

Methods: toString

1
		} 
		return w;
	} 
 
	private WifiConfiguration getKeyAppropriateConfig(final String password) {
		WifiConfiguration wf = new WifiConfiguration();
		if (wf.toString().contains(BUGGED)) {
			/* 
			 * Add hidden fields on bugged Android 3.2+ configs 
			 */ 
			wf = addHiddenFields(wf);
		} 
		wf.SSID = StringUtil.addQuotes(network.SSID);
		if (network.capabilities.length() == 0) {
			wf.BSSID = network.BSSID;
			wf.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
			wf.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
			return wf;
		} 
		wf.allowedProtocols.set(WifiConfiguration.Protocol.RSN);
		wf.allowedProtocols.set(WifiConfiguration.Protocol.WPA);