Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android 4.4上从未收到BLE通知_Android_Bluetooth Lowenergy_Bluegiga - Fatal编程技术网

android 4.4上从未收到BLE通知

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

我正在用android开发一个应用程序,用于与Blugia Table 112通信。在这里,我的BLE设备被设计为向android提供数据作为指示,我可以成功地写入特征,但我在android上没有得到任何指示。以下是我尝试设置通知的内容

public void setCharectresticNotification(
        BluetoothGattCharacteristic characteristic,
        BluetoothGattDescriptor descriptor) {
    mBluetoothGatt.setCharacteristicNotification(characteristic, true);
        descriptor
                .setValue(BluetoothGattDescriptor.ENABLE_INDICATION_VALUE);

        mBluetoothGatt.writeDescriptor(descriptor);


}
一旦成功获得特征和描述符,我就调用这个方法

另外,请提供我应该遵循的流程,以便在建立连接后设置通知