01-31-2018, 02:18 AM
If you are using ADB to set that value, that means it's most likely a protected setting in the OS that an application wouldn't be able to change without root access. There is no API in Android for doing something like that. I just verified this - https://stackoverflow.com/questions/3721...net-access
From that post:
So not only can MobileSheetsPro not do it, it seems like you'll need to do it through adb after every reboot...
Mike
From that post:
Code:
public static final String
CAPTIVE_PORTAL_DETECTION_ENABLED = "captive_portal_detection_enabled";
...
MOVED_TO_GLOBAL.add(Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED);
but throws" android.provider.Settings$SettingNotFoundException: captive_portal_detection_enabled when used explicitly and is not visible to android studio.
also, doing a settings list global does not contain the constant.
edit doing a adb shell settings put global captive_portal_detection_enabled 0 does seem to work, but this can not be done in the field when the router cycles power. this value seems to persist when the tablet cycles power. and now this value shows up in a settings list global. also, using the raw string: Settings.Global.getInt(getContentResolver(),"captive_portal_detection_enabled"); now returns 0.
edit: looks like setting it requires: android.permission.WRITE_SECURE_SETTINGS, but of course this fails when put into the manifest since we are not a system app.
edit: trying to exec the shell command throws: java.lang.SecurityException, so it looks like you need to issue the command from adb :(
So not only can MobileSheetsPro not do it, it seems like you'll need to do it through adb after every reboot...
Mike