iOS BluetoothManager框架 [英] iOS BluetoothManager Framework

查看:82
本文介绍了iOS BluetoothManager框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解 BluetoothManager框架是私有API的一部分,但我很好奇是否有人有使用它的经验.

I understand the BluetoothManager Framework is part of the private API, but I'm curious if anyone has any experience working with it.

我可以打开和关闭蓝牙,但是我想获取设备列表.

I'm able to turn Bluetooth on and off, but I'd like to get a list of devices.

调用pairedDevices方法似乎将我需要的所有信息都写到了日志中,但没有返回设备数组.

Calling the pairedDevices method seems to write all the info I need to the log, but doesn't return an array of devices.

推荐答案

您可以通过注册已发现设备的通知,然后触发发现本身来获取设备列表.传入的通知对象实际上是BluetoothDevice对象,可用于提取远程设备的名称和地址.此结构中没有内置RSSI数据.我为OS 5.1编写了一个完整的示例,如果需要的话请给我发消息.

You can get the list of devices, by registering a notification for discovered devices, and then triggering the discovery itself. The incoming notification object is actually a BluetoothDevice object, that you can use to extract name and address of the remote device. There is no RSSI data built into this structure. I wrote a complete sample for OS 5.1, drop me a message if you need it.

这篇关于iOS BluetoothManager框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆