Android examples for android.net.wifi:Wifi SSID
get SSID from WifiManager
import android.net.wifi.WifiManager; public class Main{ public static String getSSID(WifiManager wifiManager) { if (wifiManager == null) return null; if (!wifiManager.isWifiEnabled()) return null; String ssid = wifiManager.getConnectionInfo().getSSID(); if (ssid.startsWith("\"") && ssid.endsWith("\"")) { ssid = ssid.substring(1, ssid.length() - 1); }/*from ww w. j a va 2 s .c om*/ return ssid; } }