Android examples for android.net.wifi:Wifi Address
get Mac Address via WifiManager
import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.NetworkInfo; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; public class Main{ public static String getMacAddress(Context context) { WifiManager wifi = (WifiManager) context .getSystemService(Context.WIFI_SERVICE); WifiInfo info = wifi.getConnectionInfo(); return info.getMacAddress(); }/* w w w. j a v a 2 s.c o m*/ }