如何通过存储的设备名称获取蓝牙设备的mac地址(How to get bluetooth device mac address by stored device name)

编程入门 行业动态 更新时间:2024-10-09 19:22:29
如何通过存储的设备名称获取蓝牙设备的mac地址(How to get bluetooth device mac address by stored device name)

我对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.

更多推荐

本文发布于:2023-07-30 14:28:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1338773.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:蓝牙   设备   名称   地址   address

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!