在 BLE 设备中触摸按钮时读取通知

pab*_*upi 5 android bluetooth bluetooth-lowenergy bluetooth-gatt

前几天我写过这个问题:Is possible to detection touches in MiBand 2?

我发现使用 Wireshark 时,当我按下 MiBand 按钮时,乐队会向移动设备发送一个 UUID 代码。

我修改了这个示例https://github.com/googlesamples/android-BluetoothLeGatt来捕获这个事件,例如在屏幕上显示一个 Toast。但是无论我怎么努力,我都没有进步。

方法 onDescriptorRead() 和 onCharacteristicRead() 从未调用过。

如何在 Android 中使用 GATT 来捕获这种特殊特性?非常感谢