How to get name of wifi-network out of android using android API?

noisy picture noisy · Aug 20, 2010 · Viewed 50.3k times · Source

I thought that I should use NetworkInterface::getDisplayName. I got some name, but this name is different that this name which I can see, when I choosing to which network I want to connect.

Please help..

[EDIT]

acording to Loxley answer:

WifiManager wifiMgr = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE);
WifiInfo wifiInfo = wifiMgr.getConnectionInfo();
String name = wifiInfo.getSSID();

Answer

Loxley picture Loxley · Aug 20, 2010

android.net.wifi.WifiInfo.getSSID?