简体   繁体   中英

Android exisiting Wifi Scan

I'm writing an app (which is currently unfinished) that should run in the background and scan for all the Wifis in range, using the WifiManager as usual, nothing special.

I was wondering: An Android device scans for Wifis every 5 seconds or so, to check for Saved Networks and connect automatically to one of them (probably the closest). Is there a way to use this existing Wifi Scan , so that I do not need to use my own and eventually slow down the phone because of 2 existing wifi scans? Can I grab all the scanned Wifis once every 5 secs when the phone automatically scans?

You can use this. http://developer.android.com/reference/android/net/wifi/ScanResult.html

to receive scan results.

It gets WiFi Scan itself and you don't have to call getScan func.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM