I find in forum about it but can not find
I find google this code but i dont know how to use it with reflector
I find google this code but i dont know how to use it with reflector
B4X:
// disable wifi
WifiManager wifiManager = (WifiManager) mActivity.getSystemService(Context.WIFI_SERVICE);
wifiManager.setWifiEnabled(false);
try {
WifiConfiguration apConfig = new WifiConfiguration();
apConfig.SSID = SSID;
// no password now
//apConfig.preSharedKey = PASSWORD;
// reflect
Method method = wifiManager.getClass().getMethod(
"setWifiApEnabled", WifiConfiguration.class, Boolean.TYPE);
method.invoke(wifiManager, apConfig, true);
} catch (Exception e) {
e.printStackTrace();
}
if (LOGD_ENABLED) Log.d(LOG_TAG,"Create hotspot thread end" );
}