我正在连接计步器到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()返回正确的值.