Applications with the appropriate permissions (ACCESS_WIFI_STATE and CHANGE_WIFI_STATE) can access the built-in Wi-Fi sensor on a device by using the WifiManager object. You can retrieve an instance of WifiManager by using the getSystemService() method.
The Android SDK provides a set of APIs for retrieving information about the Wi-Fi networks available to a device as well as Wi-Fi network connection details. This information can be used for tracking signal strength, finding access points, or performing actions when connected to specific access points.
The emulator does not emulate Wi-Fi support, so you need to perform all testing of Wi-Fi APIs on a device.
Was this article helpful?