5

Some days ago I have written this question: Is possible to detect touches in MiBand 2?

I discovered using Wireshark that when I pulse MiBand button, the band send a UUID code to the mobile device.

I modifed this sample https://github.com/googlesamples/android-BluetoothLeGatt to capture this event and for example show a Toast in screen. But However hard I tried, I do not advance.

Methods onDescriptorRead() and onCharacteristicRead() never called.

How is the way to capture this special characteristic using GATT in Android? Thanks a lot

Community
  • 1
  • 1
pablogupi
  • 774
  • 11
  • 27
  • I am not sure if I understand you. Read and Notification are two different things; if the device shall send a notification, the CCCD of the service has to be configured for notification by the app before the app can be notified. onCharacteristicRead() is only called if you have issued a read request before, and onDescriptorRead() is the answer to a read CCCD request. None of these two read responses is involved here. – Thern Feb 20 '17 at 09:45

0 Answers0