MAC ADDRESS
可以使用手机Wifi或蓝牙的MAC地址作为设备标识,但是并不推荐这么做,原因有以下两点:
硬件限制:并不是所有的设备都有Wifi和蓝牙硬件,硬件不存在自然也就得不到这一信息。
获取的限制:如果Wifi没有打开过,是无法获取其Mac地址的;而蓝牙是只有在打开的时候才能获取到其Mac地址。
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
public String getLocalMacAddress() {
WifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);
WifiInfo info = wifi.getConnectionInfo(http://www.amjmh.com/v/BIBRGZ_558768/);
return info.getMacAddress();
}
MAC ADDRESS的更多相关文章
- Ubuntu 下,修改 Mac address
ifconfig // check Mac address sudo ifconfig eth0 down sudo ifconfig eth0 hw ether xx:xx:xx:xx: ...
- 【小错误】Device eth2 has different MAC address than expected, ignoring.
今天在搭建rac配置IP的时候报错显示如下: Device eth2 has different MAC address than expected, ignoring.[FAILED] 百度了下,问 ...
- Find mac address
Windows Method 1: Using the Command Prompt 1 Click on the Start button. 2 Type cmd in the search b ...
- OK335xS mac address hacking
/*********************************************************************** * OK335xS mac address hacki ...
- 利用C语言获取设备的MAC address
利用C语言获取设备的MAC address MAC address --> Medium Access Control layer address // // http://www.binary ...
- 关于获得本机Mac Address的方法
网络上有讲获得Mac address的方法有如下: 1. 发送ARP命令,利用返回的Mac Address缓冲区得到 2. 用NetworkInterface.GetAllNetworkInterfa ...
- what is MAC address
MAC Address:media access control address A media access control address (MAC address) is a unique id ...
- vb.net 使用ip查詢(Host Name)(WorkGroup Name)(MAC Address)-運用cmd及nbtstat命令
Sub nbtstat(ByVal ip As String) Dim strRst, strRst1, strRst2, strRst3 As String Dim n1, n2, n3 As In ...
- How to Change MAC Address on Ubuntu
1 Open Terminal. 2 Log in as root so type: sudo -i and then write your password. 3 View your cur ...
- Get MAC address using POSIX APIs
#include <stdio.h>#include <unistd.h>#include <netdb.h>#include <arpa/inet.h> ...
随机推荐
- 小程序 ----踩坑 ---安卓iOS兼容等
关于小程序一些小功能的代码都在这个GitHub上,感兴趣的可以去看看,https://github.com/huihuijiang/miniProgram目前有:列表左滑删除,拖拽浮标 一.小程序坑1 ...
- Spring MVC 全局异常处理&文件上传
Spring MVC 全局异常处理 使用SimpleMappingExceptionResolver实现异常处理 在welcome-servlet.xml进行如下配置: <bean class= ...
- DataTable序列化及反序列化Json
添加Json解析引用 using Newtonsoft.Json; 实现方式一:普通转换 private void button1_Click(object sender, EventArgs e) ...
- 第一章、接口规范之web-api接口
1.什么是Web API接口 通过网络,规定了前后台信息交互规则的url链接,也就是前后台信息交互的媒介 Web API接口和一般的url链接还是有区别的,Web API接口简单概括有下面四大特点 u ...
- IDEA 社区版集成TOMCAT
直接在POM.XML中添加以下内容 <plugin> <groupId>org.apache.tomcat.maven</groupId> <ar ...
- Delphi 编写线程的清除代码
- 2.03_Python网络爬虫Http和Https
一:HTTP和HTTPS HTTP协议(HyperText Transfer Protocol,超文本传输协议):是一种发布和接收 HTML页面的方法,以明文的形式传输,效率高,但是不安全 HTTPS ...
- 图像处理---《在图片上打印文字 windows+GDI+TrueType字体》
图像处理---<在图片上打印文字 windows+GDI+TrueType字体> 刚开始使用的是putText()函数做,缺陷是只能显示非中文: 接着,看大多数推荐Freetype库来做 ...
- BZOJ 3439: Kpm的MC密码 (trie+dfs序主席树)
题意 略 分析 把串倒过来插进trietrietrie上, 那么一个串的kpmkpmkpm串就是这个串在trietrietrie上对应的结点的子树下面的所有字符串. 那么像 BZOJ 3551/354 ...
- mysql慢查询配置(5.7)
刚装了Windows版mysql,想开启慢查询日志. 修改D:\mysql-5.7.23-winx64下my.ini配置文件,添加: [mysqld]slow_query_log = onslow_q ...