I wrote a simple script to log in to a captive portal automatically. I would like to find a way to launch this script whenever I connect to the specific SSID using this portal. The only way I have found to do this is to grep the information from "dumpsys wifi", which is show and must be run as root. Smanager has access to this information, so I am requesting to set a SM_NET_SSID variable or something similar on connectivity changes to WiFi so that I can test for this in my script without root and without launching a separate process. Thank you.
Access WiFi SSID on connectivity change