I\'m using in the app
setWifiApEnabled()
from Hidden API (access by reflection). In some older phone it´s working (also with Samsung Galaxy S3,
public void setWiFiApMode(boolean mode) {
if (mContext == null) return;
WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
if (wifiManager == null) return;
try {
Method setWifiApEnabled = WifiManager.class.getMethod("setWifiApEnabled", WifiConfiguration.class, boolean.class);
setWifiApEnabled.invoke(wifiManager, null, mode);
} catch (Exception e) {
}
}
and
Fully works on Android N.