1、<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
2、private String getLocalMacAddress() {
WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
WifiInfo info = wifi.getConnectionInfo();
return info.getMacAddress();
}
时间: 2024-10-20 08:37:23