我对android很陌生,我也是新手。
我想知道android api是否提供了一些使用以前存储的蓝牙设备名称来获取蓝牙mac地址的方法? 我在这里和互联网上搜索了很多例子,其中大多数使用列表格式来显示设备名称和MAC地址,我需要的是通过已知的设备名称获取一个MAC地址。
如果有人在这里可以帮助我,请提前致谢。
Yman
I am new to android and I am new here too.
I want to know if android api provides some methods to get bluetooth mac address using previous stored bluetooth device name? I searched many examples here and from internet and most of them using list format to show both device name and mac address, what I need is to get one mac address by a known device name.
Thanks in advance if someone here can help me.
Yman
最满意答案
我认为这是不可能的。你不能从一个已知的设备名称获得MAC地址。蓝牙设备名称不是蓝牙连接和通信的关键元素,但MAC地址将是。只有您可以获取MAC地址根据设备名称,如果您预存了相关的BluetoothDevice对象并且名称与其他名称不同。
I think it's impossible.You can't get the mac address only from a known device name.The bluetooth device name is not the key element for the bluetooth connection and communication,but the mac address will be.Only you can get the mac address according to the device name if you has pre-stored the related BluetoothDevice object and the name is different from the others.
更多推荐
发布评论