Code example for WifiManager

Methods: addNetworkenableNetwork

0
     *  
     * @param config 
     * @return 
     */ 
    public boolean addNetWordLink(WifiConfiguration config) {
        int NetId = wifiManager.addNetwork(config);
        return wifiManager.enableNetwork(NetId, true);
    } 
 
    /** 
     * 禁用一个链接 
     *  
     * @param NetId 
     * @return 
     */ 
    public boolean disableNetWordLink(int NetId) {
        wifiManager.disableNetwork(NetId);
        return wifiManager.disconnect();
    } 
 
    /**