Reputation: 1064
I have work with open ssid of wifi.
when auto wifi connected to ssid that time automatically default browser open and redirect to Captive Portal.
I have find the method ignoreNetwork() in CaptivePortal class in Android library.
Show below link:
How can I use ignoreNetwork() method in my project?
How to create instance of CaptivePortal class?
Upvotes: 3
Views: 2466
Reputation: 446
You don't need to create a CaptivePortal class instance.
You can disable the Captive Portal Detection by changing Android Settings with adb
tool.
Run in your host command prompt:
//Android 4+
adb shell settings put global captive_portal_detection_enabled 0
//Since Android 7
adb shell settings put global captive_portal_mode 0
More details: https://github.com/ukanth/afwall/wiki/FAQ#61-what-is-androids-captive-portal-check
Also, check this answer maybe it helps.
Upvotes: 0