Yann de Champlain
asked on
Have experience coding for HotSpot on Android V6-7?
Problem to turn On HotSpot on Android 6+
It works on Android 4.4-5 but restricted on V6+.
Anybody having experience working with HotSpot on Android V6-7?
We followed this tuto: http://omtlab.com/android-enable-disable-hotspot-programmatically/ made in 2014.
I do not get any error message. It just won't open the Hotspot. Closing Wifi works however. (We close Wifi before we enable the HotSpot)
It works on Android 4.4-5 but restricted on V6+.
Anybody having experience working with HotSpot on Android V6-7?
/**
* Turn On or Off wifi
*
* @param context
* @param isTurnToOn
*/
public static void turnOnOffWifi(Context context, boolean isTurnToOn) {
WifiManager wifiManager = (WifiManager) context
.getSystemService(Context.WIFI_SERVICE);
if (isTurnToOn && isHotspotSupported() && isHotspotOn(context)) {
turnOnOffHotspot(context, false);
}
wifiManager.setWifiEnabled(isTurnToOn);
if(isTurnToOn){
writeLog(context, "turn on WIFI");
}else{
writeLog(context, "turn off WIFI");
}
}
We followed this tuto: http://omtlab.com/android-enable-disable-hotspot-programmatically/ made in 2014.
I do not get any error message. It just won't open the Hotspot. Closing Wifi works however. (We close Wifi before we enable the HotSpot)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER