Using Android's WifiManager to scan for available Wifi networks is easy.
context.getSystemServiceWhat I had not realized was that this process once started just keeps rolling. As far as I can tell the only way to stop it is to unregister the broadcast receiver in question.
I am assuming that the device keeps scanning for wifi networks by default anyway so at a later time I can use the same WifiManger handle to grab a fresh list of available networks.
As you well assumed, the OS is tracking WiFi events anyway, by using WiFiManager you are just subscribing your application to receive certain types of notifications.
If your application is no longer interested in them, you should unregister your application receiver, avoiding unnecessary context switches on WiFi events.
The reference for WifiManager is not very descriptive, but you can find some hints about what the OS does in the ConenctivtyManager reference: https://developer.android.com/reference/android/net/ConnectivityManager.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With