我正在开发使用蓝牙播放的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).
更多推荐
发布评论