I would like some clarifications on the behavior of WifiManager.getScanResults()
, namely :
When wireless is enabled
When wireless is disabled
getScanResults()
will return null
...When wireless is enabled
2.Surprisingly enough getScanResults()
will return null
after some time (on a Nexus One, Android 2.3.7, Cyanogen mod - but I suspect this is not really relevant). So yes, apparently one has to initiate a scan irrespective of the wireless status
I guess this is true also if the state is WIFI_STATE_DISABLING
I am still interested in the answer in the case wireless is enabled - in particular question 2, if the device is asleep. Google groups won't let me post (hint)
public List getScanResults ()
Added in API LEVEL 1
Return the results of the latest access point scan.
Returns
the list of access points found in the most recent scan. An app must hold ACCESS_COARSE_LOCATION
or ACCESS_FINE_LOCATION
permission in order to get valid results.