一粒程序米
一粒程序米
调试了一会儿,发现作者使用的mCharacteristic是空的,而不是从函数传入的。所以我就在BleManager.getInstance().notify这个函数里加上了characteristic;详情请看我改了哪些地方,跟着我改就可以了:       ` BluetoothGattDescriptor descriptor = null; List descriptors = characteristic.getDescriptors(); for (BluetoothGattDescriptor desc : descriptors) { if (desc.getCharacteristic().getUuid().equals(formUUID(UUID_CLIENT_CHARACTERISTIC_CONFIG_DESCRIPTOR))) { descriptor = desc; break; }...