Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get list of available WiFi spots

Tags:

android

list

wifi

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 connected to a WiFi Access Point.

Is there any way to show all current available WiFi spots in a list?

Thanks in advance

like image 257
Hannelore Avatar asked May 09 '11 11:05

Hannelore


1 Answers

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).

like image 107
Stephan Avatar answered Sep 20 '22 16:09

Stephan