Code example for WifiManager

Methods: addNetworkenableNetwork

0
    	wc.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.CCMP);
    	wc.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.WPA_PSK);
    	wc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP);
    	wc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP);
    	wc.allowedProtocols.set(WifiConfiguration.Protocol.RSN);
    	int res = wifi.addNetwork(wc);
    	return wifi.enableNetwork(res, true);
    } 
    /** 
     * ����WIFIAP�߳� 
     * @author Moonlight 
     */ 
    class SetWifiAPTask extends AsyncTask<Void, Void, Void> {
        boolean mMode;
        boolean mFinish;
        public SetWifiAPTask(boolean mode, boolean finish) {
            mMode = mode;
            mFinish = finish;
        } 
        ProgressDialog d = new ProgressDialog(context);
        @Override