user3605016 user3605016 - 1 year ago 139
Android Question

How to get SSID of all password added(Configured) WiFi programmatically?

I want to get all WiFi detail which i have added password?I

WifiManager wifiManager = (WifiManager)getApplicationContext().getSystemService(Context.WIFI_SERVICE);
List<WifiConfiguration> configuredList = wifiManager.getConfiguredNetworks();

Answer Source

You can simply get the SSID from the public SSID field of WifiConfiguration:

List<String> ssidList = new ArrayList<>();

for(WifiConfiguration config : configuredList) {

Don't forget to add the ACCESS_WIFI_STATE permission to your AndroidManifest.xml:

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download