android 4.4上从未收到BLE通知
我正在用android开发一个应用程序,用于与Blugia Table 112通信。在这里,我的BLE设备被设计为向android提供数据作为指示,我可以成功地写入特征,但我在android上没有得到任何指示。以下是我尝试设置通知的内容android 4.4上从未收到BLE通知,android,bluetooth-lowenergy,bluegiga,Android,Bluetooth Lowenergy,Bluegiga,我正在用android开发一个应用程序,用于与Blugia Table 112通信。在这里,我的BLE设备被设计为向android提供数据作为指示,我可以成功地写入特征,但我在android上没有得到任何指示。以下是我尝试设置通知的内容 public void setCharectresticNotification( BluetoothGattCharacteristic characteristic, BluetoothGattDescriptor descr
public void setCharectresticNotification(
BluetoothGattCharacteristic characteristic,
BluetoothGattDescriptor descriptor) {
mBluetoothGatt.setCharacteristicNotification(characteristic, true);
descriptor
.setValue(BluetoothGattDescriptor.ENABLE_INDICATION_VALUE);
mBluetoothGatt.writeDescriptor(descriptor);
}
一旦成功获得特征和描述符,我就调用这个方法
另外,请提供我应该遵循的流程,以便在建立连接后设置通知