Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 890
noisy Avatar asked Aug 20 '10 14:08

noisy


People also ask

How do I find my Wi-Fi name on Android?

getConnectionInfo(); String ssid = wifiInfo. getSSID();

Where are Wi-Fi profiles stored on Android?

The settings database is located at /data/data/com.

What is API in Wi-Fi?

The Native Wifi API contains functions, structures, and enumerations that support wireless network connectivity and wireless profile management. The API can be used for both infrastructure and ad hoc networks.


1 Answers

android.net.wifi.WifiInfo.getSSID?


WifiManager wifiMgr = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE); WifiInfo wifiInfo = wifiMgr.getConnectionInfo(); String name = wifiInfo.getSSID(); 
like image 154
Loxley Avatar answered Sep 19 '22 02:09

Loxley