Moved scanNetworks in the example before wifi connection setup in order to show the list of possible WiFi APs.