I have read several posting on this same thing and tried all of the 
suggestions.

I am able to discover and connect to my BTLE device (it is actually an iOS 
device).

My Android device is 4.4 and has BTLE.

After I connect and get all the services and characteristics I try to read 
the one I am using and it works fine. If I update the value on the iOS 
device and do another read I get the new value as I would expect.

I use this code:

protected static final UUID 
CHARACTERISTIC_UPDATE_NOTIFICATION_DESCRIPTOR_UUID = UUID.fromString(
"00002902-0000-1000-8000-00805f9b34fb");
if (gatt.setCharacteristicNotification(characteristic, true)) {

BluetoothGattDescriptor descriptor = 
characteristic.getDescriptor(CHARACTERISTIC_UPDATE_NOTIFICATION_DESCRIPTOR_UUID);
if (descriptor != null) {

descriptor.setValue(enabled ? 
BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE : 
BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE);
if (gatt.writeDescriptor(descriptor)) {
// success
}
else {
// failed
}
}
}

It reaches the // success line so it seems to be doing what I want I just 
never get the notifications. I know that this characteristic I am trying to 
subscribe to has the notification flag set on it. I do that in the iOS 
application. Unless something is going wrong there I guess.

How can I debug this to figure out what is going on? Should I get something 
in the onDescriptor callback maybe? Where do I look and how do I diagnose?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to