I have created an wifiap with a password, but for a project I would like to create a open network. I have tried the following, but if there already is a password, then it is still active.
        Method getWifiConfig = mWifiManager.getClass().getMethod("getWifiApConfiguration",null);
        WifiConfiguration wifiConf  = (WifiConfiguration)getWifiConfig.invoke(mWifiManager, null); 
        wifiConf.SSID = "enny";
        //wifiConf.preSharedKey = "fuunnv12345";
        wifiConf.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN);
        wifiConf.allowedProtocols.set(WifiConfiguration.Protocol.RSN);
        wifiConf.allowedProtocols.set(WifiConfiguration.Protocol.WPA);
        wifiConf.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
        Method setWifiConfig = mWifiManager.getClass().getMethod("setWifiApConfiguration",WifiConfiguration.class);
        setWifiConfig.invoke(mWifiManager,wifiConf);
        Method method = mWifiManager.getClass().getMethod("setWifiApEnabled", WifiConfiguration.class, boolean.class);
        method.invoke(mWifiManager, null, enabled);
 
    