When a user connects to an open WiFi with a Captive Portal, the Android device will open a browser instance with the captive portal/login page.
We want to disable it, since we used an app for login purposes.
I came across the CaptivePortal Class into Android Marshmallow. Can I use it to disable network?
Class Name: android.net.CaptivePortal
Method Name: ignoreNetwork
How can I use the above class and method to disable auto launch of captive portal on WiFi?