You can't "scan" a hidden wifi SSID - there's nothing to scan. (Scanning looks for beacon broadcasts - transmissions saying "I'm SSID xyz and I use security". "Hidden" just means that the router isn't making those transmissions, so you can't find them.) That's why you can enter the SSID of the router you want to connect to - if you know the SSID of the hidden network, you can connect to it. It's not as secure as using passwords, but you can spend years guessing at a hidden SSID in one location.
But there's no way to write an app that looks for transmissions that aren't being made. Wireshark is about the best you can do. Learn to use it and you might find a hidden non-secure network. (Which it's illegal for you to connect to, but it's a good learning exercise to find hidden networks as long as you don't connect to them.)