bluetooth lowenergy - Android BLE onCharacteristicChanged not invoked -


in app have used setcharacteristicnotification enable notificaito characteristic. in log cat getting notification enable true got success on ondescriptorwrite callback callback method oncharacteristicchanged not called.please me. in advance

log

 d/bluetoothgatt(15694): setcharacteristicnotification() - uuid: 00003c01-0000-1000-8000-00805f9b34fb enable: true 

code

 mbluetoothgatt.setcharacteristicnotification(characteristic, enabled);              bluetoothgattdescriptor descriptor = characteristic.getdescriptor(                     uuid.fromstring(samplegattattributes.client_characteristic_config));             descriptor.setvalue(bluetoothgattdescriptor.enable_notification_value);            return mbluetoothgatt.writedescriptor(descriptor); 

just added sleep between read , write operations , working fine.

try {                     thread.sleep(200);                 } catch (interruptedexception e) {                     e.printstacktrace();                 } 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -