Q:

Check availability of hidden wifi network

Within an app I am trying to create, I want to check for the availability of a hidden WiFi SSID. Sadly, networks with hidden SSIDs dont show up in scans so I cant wait for scan results returned via WifiManager.SCAN_RESULTS_AVAILABLE_ACTION. 
I attempted to use android.net.wifi.WifiManager.enableNetwork(int netId, boolean disableOthers) after creating the WifiConfig for the network, thinking that it would return true if the network was able to be connected to, and false otherwise, but that pretty much always returns true, even in cases where i create gibberish WifiConfigs.
I just need to test if the hidden network is broadcasting or not. I know all of its information, including the SSID.

A:

The SSIDs of hidden networks are, well hidden. So they are not broadcasting their SSIDs. To check the availability of a hidden network, you should try to connect to the network. If it succeeds, its there, otherwise not.
A second option to is sniff for traffic in the network in monitor mode, and look for the corresponding BSSID. That requires root though, and some tool or app that allows you to do that. The first option will always work, but you have be active. The second allows you to passively check networks, but requires root.

