iOS BluetoothManager Framework

为君一笑 提交于 2020-02-04 02:37:27

问题


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.

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


回答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.



来源:https://stackoverflow.com/questions/5877879/ios-bluetoothmanager-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!