如果应用程序被锁定,可以接收蓝牙数据吗?
就是这个问题。您会看到其他设备声称它们可以,但构建在较旧的平台上。任何示例代码都会很棒。
Simply that question. You see other devices stating that they can, but built on older platforms. Any sample code would be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这是可能的。您需要在 info.plist 文件中将
UIBackgroundModes
设置为“bluetooth-central”。另请注意,技术问答iOS 开发者库中的 QA1657 内容如下
开发人员参考资料还指出,iOS5 中有一个用于低功耗设备的核心蓝牙框架,但它仅适用于蓝牙 4.0 设备 (BTLE),目前在 iPhone 4S 上。
Yes, it is possible. You need to set
UIBackgroundModes
to "bluetooth-central" in info.plist file.Note also, that Technical Q&A QA1657 in iOS Developer Library says the following
Developer reference also says that there is a Core Bluetooth framework for Low Energy devices in iOS5, but it's for Bluetooth 4.0 devices (BTLE) only, currently on the iPhone 4S.