相关疑难解决方法(0)

characteristic.getDescriptor()返回null

我正在连接计步器到android.当我在setCharacteristicNotification函数中执行以下行时,我将描述符设为Null

BluetoothGattDescriptor descriptor = characteristic.getDescriptor(UUID.fromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG));



public static String CLIENT_CHARACTERISTIC_CONFIG = "00002902-0000-1000-8000-00805f9b34fb";
Run Code Online (Sandbox Code Playgroud)

为什么它返回一个空值?

characteristic.getUuid()返回正确的值.

java android

6
推荐指数
2
解决办法
4003
查看次数

标签 统计

android ×1

java ×1