The place where random ideas get written down and lost in time.
2025-02-09 - Wifi APIs on Android 13
Category DEVI’m still in the process of updating RTAC to work properly on Android 13.
RTAC uses a number of APIs which have been deprecated since Android 10. Since it was running on 2017 hardware with Android 9, that wasn’t much of a problem. Now I want to move to newer hardware that runs Android 13 so I need to deal with it.
WifiLock:
- The WifiManager.WifiLock API is still present and usable.
- I’ve added a handler class for it in TCM.
- However it’s not absolutely clear what it really provides.
WifiManager#enableNetwork is reserved to “Device Owners” and system apps.
- It seems that ConnectivityManager#requestNetwork could be an adequate replacement?
- A first try of the ConnectivityManager#requestNetwork API wasn’t conclusive.
- The app suddenly displayed a model dialog “connecting to device” with a spinner, which has the undesirable side-effect of pausing the main TCM activity.
- Configuring the request for a known SSID did… nothing. It stayed on that spinner and did not switch to that wifi network.
- Configuring the request for a known SSID and its WPA password did something weird where the wifi list showed a second entry of the SSID “for this particular app”.
- So far that didn’t work as expected. My goal is to switch the wifi to an already known SSID that has already been configured in the Android wifi setting and already set up with password et al.
To be continued.
Generated on 2025-02-20 by Rig4j 0.1-Exp-f2c0035