Get list of available WiFi spots

后端 未结 2 637
夕颜
夕颜 2020-12-29 15:55

I\'m creating an app that needs internet connection. So when the WiFi setting is not enabled, I pop up a message to switch it on. But when it\'s on, it\'s not nessecarily co

相关标签:
2条回答
  • 2020-12-29 16:35

    Have a look on the methods of the WifiManager class. Especially the getScanResults() method will return the results of the last scan for Wifi networks. Be aware that the getConfiguredNetworks() only returns those networks that have been configured beforehand by the user (i.e. the password has been provided for a secured network, etc).

    0 讨论(0)
  • 2020-12-29 16:52

    http://developer.android.com/reference/android/net/wifi/WifiManager.html#startScan()

    0 讨论(0)
提交回复
热议问题