iOS 蓝牙有三种状态: 一种是蓝色,可连接状态 一种是灰色,不连接状态 一种是斜线,关闭状态
问题是,后两者都是 CBManagerStatePoweredOff
有什么方法可以判断区分后两个状态吗?
1
fruitscandy 2019-11-29 20:49:56 +08:00
白底那个是从控制中心关闭的,非彻底
灰色那个是从设置里面关闭的,彻底 |
2
Ocsap OP @fruitscandy 是的,,,怎么用代码判断
|
3
QiuZH 2020-12-04 13:27:39 +08:00
CBManagerState 里面有应该就有,没有就没办法了吧
* @constant CBManagerStateUnknown State unknown, update imminent. * @constant CBManagerStateResetting The connection with the system service was momentarily lost, update imminent. * @constant CBManagerStateUnsupported The platform doesn't support the Bluetooth Low Energy Central/Client role. * @constant CBManagerStateUnauthorized The application is not authorized to use the Bluetooth Low Energy role. * @constant CBManagerStatePoweredOff Bluetooth is currently powered off. * @constant CBManagerStatePoweredOn Bluetooth is currently powered on and available to use. |