如何检查配对的蓝牙设备在黑莓手机中是否可用?

发布于 2025-01-06 00:35:54 字数 116 浏览 0 评论 0原文

我遇到以下问题: 我需要检查是否存在通过蓝牙配对的设备并且是否可以进行通信。 当我从 DiscoveryAgent 启动 startInquiry 方法时,它会检索所有可用设备而无需配对,

感谢您的帮助

I faced following issue:
I need to check is the paired device via Bluetooth present and availbale to communicate.
When I start startInquiry method from DiscoveryAgent, it retrieves all available devices without paired ones

thanks for any help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

谜兔 2025-01-13 00:35:54

一个黑客解决方案是为该配对设备启动 DiscoveryAgent.searchServices() ,如果您没有获得任何服务,那么您可以说该设备不可用于通信。

A hackish solution would be to start DiscoveryAgent.searchServices() for that paired device and if you don't get even a single service then you can say that the device is not available for communication.

蓝梦月影 2025-01-13 00:35:54

方法 BluetoothSerialPort.getSerialPortInfo 仅返回配对的设备。

The method BluetoothSerialPort.getSerialPortInfo returns only the paired devices.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文