Disable captive portal detection in android
WifiConfiguration wc = new WifiConfiguration();
String ssid = result.SSID;
wc.SSID ="\""+ AccessPointName+"\"";
wc.status = WifiConfiguration.Status.ENABLED;
wc.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE);
int res = wifiManager.addNetwork(wc);
boolean x= wifiManager.enableNetwork(res, true);
wifiManager.reconnect();
This ssid is using the inactive portal, is there any configuration to stop android from checking the unwitting portal.
+3
user1928473
source
to share
1 answer
Just run the following commands in the terminal as root:
Settings
put global captive_portal_server 127.0.0.1 && & settings put global captive_portal_detection_enabled 0
0
Alex
source
to share