相关疑难解决方法(0)

如何以编程方式获取iphone中蓝牙(ON/OFF)的状态

我试图通过编程方式获取iPhone/iPod蓝牙的状态,无论是开启还是关闭.是否可以使用某些Apple API或第三方API.

iphone bluetooth iobluetooth ios

39
推荐指数
5
解决办法
5万
查看次数

iOS - 检查蓝牙是否打开而没有向用户弹出系统警报弹出窗口

此代码允许确定当前的蓝牙状态:

CBCentralManager* testBluetooth = [[CBCentralManager alloc] initWithDelegate:nil queue: nil];


switch ([testBluetooth state]) {....}
Run Code Online (Sandbox Code Playgroud)

但是,当[[CBCentralManager alloc] init ...]发生时,如果蓝牙关闭,系统会向用户弹出警报.

有没有办法检查蓝牙状态而不打扰我的用户?

alert bluetooth status ios

12
推荐指数
3
解决办法
2万
查看次数

标签 统计

bluetooth ×2

ios ×2

alert ×1

iobluetooth ×1

iphone ×1

status ×1