Android下如何获取Mac地址?
来源:互联网 发布:unity3d 水的特效 编辑:程序博客网 时间:2024/05/16 17:13
Android下如何获取Mac地址?
1、需要在AndroidManifest.xml文件中添加权限
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
2、Java代码(必须在Activity中使用)
public String getLocalMacAddress() {
WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
WifiInfo info = wifi.getConnectionInfo();
return info.getMacAddress();
}
- Android下如何获取Mac地址
- Android下如何获取Mac地址?
- Android下如何获取Mac地址?
- Android下如何获取Mac地址
- Linux下如何获取MAC地址
- Linux下如何获取网络设备MAC地址
- android如何获取以太网mac地址
- Android M 如何获取 Wifi MAC地址
- 如何获取MAC地址
- 如何获取MAC地址
- 【Android】获取Mac地址
- 【Android】获取Mac地址
- android获取mac地址
- Android 获取Mac地址
- android获取mac地址
- android获取mac地址
- 【Android】获取Mac地址
- android获取mac地址
- web应用部署
- rmmod: chdir(/lib/modules): No such file or directory 解决方法
- IOS学习笔记31—两个ViewController间传值(二)
- 学习UIControl。
- 5.session flush 隔离级别:测试
- Android下如何获取Mac地址?
- OCP-047 SET CONSTRAINTS DEFERRABLE OR IMMEDIATE
- 圆盘菜单
- 6.session flush 隔离级别:总结
- 整合Spring和Struts时org.springframework.beans.factory.CannotLoadBeanClassException解决办法
- ubuntu安装软件命令
- WPF中的换行符
- 在一个数组中,找出所有这样的数a[i],其左边的数都小于等于它,右边的数都大于等于它
- XX is not in the sudoers file 问题解决【转载】