Hi all, I want to configure WiFi on my android based board. But in my case I am getting the name of active SSID withing the network from the desktop client so I have to configure the board with the same SSID.
I have searched the APIs available in WiFiManager class and only possible solution seemed to be, --------------------------------------------------------------------------------------------------------- List<ScanResult> hotSpots = wifiManager.getScanResults(); for(ScanResult hotSpot: hotSpots) { String hotSpotSsid = hotSpot.SSID; String hotSpotBssid = hotSpot.BSSID; StringBuffer sBuf = new StringBuffer("\""); sBuf.append(hotSpotSsid+"\""); hotSpotSsid = sBuf.toString(); if(hotSpotSsid.equals("\"myhotspot\"")) { WifiConfiguration wifiConfiguration = new WifiConfiguration(); wifiConfiguration.SSID = hotSpotSsid; wifiConfiguration.BSSID = hotSpotBssid; wifiConfiguration.hiddenSSID = false; wifiConfiguration.priority = 100000; // add this to the configured networks int inetId = wifiManager.addNetwork(wifiConfiguration); if(inetId < 0) { System.out.println("Unable to add network configuration for SSID: "+hotSpotSsid); return; } // connect to this wifi network ----------------------------------------------------------------------------------------------------------- means I have to have list of all the availabe networks and among them I need to search network with required SSID it will increase unnecessary operation to connect to the SSID which we know. Is there any API available to get information regarding whole WIFIConfiguration if we know only "SSID"? Thanks, Asif -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en