查找蓝牙设备的类型,无论是手机还是笔记本电脑或Mac PC(Find type of bluetooth device whether mobile or laptop's or mac p

编程入门 行业动态 更新时间:2024-10-28 19:31:21
查找蓝牙设备的类型,无论是手机还是笔记本电脑或Mac PC(Find type of bluetooth device whether mobile or laptop's or mac pc's)

我正在开发使用蓝牙播放的Android游戏应用程序。 搜索蓝牙设备时,搜索结果包含移动设备以及Mac PC /笔记本电脑。 我想仅列出结果列表中的移动设备。 是否有可能找到检测到的设备是否是移动设备?

I am developing an android game application played using bluetooth. While searching for bluetooth device, results contain both mobile devices as well as mac pc/laptops. I would like to list only the mobile devices in my result list. Is it possible to find whether the device detected is mobile device or not?

最满意答案

当你有BluetoothDevice时,你可以调用getBluetoothClass 。 智能手机预计具有PHONE_SMART值,而计算机应具有COMPUTER_ *值(例如COMPUTER_DESKTOP或COMPUTER_LAPTOP )。

When you have BluetoothDevice you can call getBluetoothClass. Smart phones are expected to have PHONE_SMART value, while computers should have COMPUTER_* values (for example COMPUTER_DESKTOP or COMPUTER_LAPTOP).

更多推荐

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

发布评论

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

>www.elefans.com

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