Android examples for android.net.wifi:Wifi State
Is Exists in WifiManager
import java.util.List; import android.net.wifi.WifiConfiguration; import android.net.wifi.WifiManager; public class Main { public static WifiConfiguration IsExists(String SSID, WifiManager wifiManager) { List<WifiConfiguration> existingConfigs = wifiManager.getConfiguredNetworks(); for (WifiConfiguration existingConfig : existingConfigs) { String ssid = existingConfig.SSID; if (existingConfig.SSID.equals(SSID)) { return existingConfig; }//from www.ja v a 2s . c o m } return null; } }