I’m working on an Android project to scan the local WiFi environment in our office. The short story is that we want to find access points that don’t belong there.
The problem: Android does not seem to return information regarding access points with hidden SSIDs. Does anyone know how this is done? On other platforms a scan result set would typically contains all the usual data regarding an access point with a hidden SSID, minus (obviously) its SSID.
Does anyone know how this is done on Android?
My code looks like examples I’ve seen:
public class Scanner {
private WifiManager mainWifi;
private WifiReceiver receiverWifi;
// ...
public Scanner(Context context){
mainWifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
receiverWifi = new WifiReceiver();
context.registerReceiver(receiverWifi, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
mainWifi.startScan();
}
// ...
class WifiReceiver extends BroadcastReceiver {
public void onReceive(Context c, Intent intent) {
List<ScanResult> scanResultsList = mainWifi.getScanResults();
// ...
}
}
}
Thanks!
This is how android is built to work. No hidden SSID’s get passed along to applications during the scans.
This is a bug that has been reported a long time ago and has never even been looked at.
http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&sqi=2&ved=0CC4QFjAB&url=http%3A%2F%2Fcode.google.com%2Fp%2Fandroid%2Fissues%2Fdetail%3Fid%3D10305&ei=mf8CT-rREOTf0QH94LS3Ag&usg=AFQjCNECvPs0QfS2MERv4jQmL7CYSsR95A&sig2=W0DAy5n32wzl0sAbo5E42g