My code before android Q is here, but for android Q this function returns "unknownssid". For Android 12, I know I need to use this ConnectivityManager.NetworkCallback and ConnectivityManager # getNetworkCapabilities and ConnectivityManager # getLinkProperties, but I can't find the sample code. To display the ssid, I need to set "ConnectivityManager.NetworkCallback.FLAG_INCLUDE_LOCATION_INFO" in the argument of ConnectivityManager.NetworkCallback, but I don't know how to set it. If anyone knows, please teach me.
We are modifying programs and developing apps. We are developing an app that connects to public WiFi, Currently, we are supporting android12.