【发布时间】:2014-04-22 09:05:31
【问题描述】:
我正在研究适用于 Android 的低功耗蓝牙(BLE,蓝牙 4.0)。
我已经参考了类似链接的文档:Bluetooth Low Energy。
它使用connectGatt()方法连接到device-A上的GATT服务器,如下所示。
mBluetoothGatt = device_A.connectGatt(this, false, mGattCallback);
它在mGattCallback中有onConnectionStateChange、onCharacteristicRead等。
The question is:
1. BluetoothGattCallback 何时被调用?
2。当device-A 对device-A 上的所有特征有任何更改时,mBluetoothGatt 中的onConnectionStateChange 是否会返回消息? ,还是只返回我所连接的特征??
【问题讨论】:
标签: android bluetooth bluetooth-lowenergy