How to determine wifi network interface name in java?
Since you said that you are developing on Android use this:
WifiManager wifiManager = (WifiManager) this.getSystemService(WIFI_SERVICE);
WifiInfo wifiInfo = wifiManager.getConnectionInfo();
System.out.println(wifiInfo.getSSID());
This will return the name of your WIFI.
You have to add this permission to your manifest.
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With