Code example for WifiManager

Methods: disableNetwork

0
    } 
     
    private void disableNetwork(String[] args) {
    	if (args.length == 2) {
    		int id = Integer.parseInt(args[1]);
    		if (sWifiManager.disableNetwork(id)) {
    		    send("Successfully disabled network with ID " + id);
    		} else { 
    		    send("Could not disable network with ID " + id);
    		} 
    	} else { 
    		send("Error disabling network"); 
    	} 
    } 
     
    private void enableWifi() { 
    	send("Enabling Wifi"); 
    	boolean ret = sWifiManager.setWifiEnabled(true);
    	if (ret) {
    		send("Enabled Wifi"); 
    	} else {