Closed lzxsmile closed 5 years ago
Request was moved out of BleManager to a standalone class. Just add import as it will suggest.
i import the class,that method writeCharacteristic(mAlertLevelCharacteristic) will err.
import the first one ?
Yes, the first one, as it suggests. Also, the data parameter has to be given as a parameter, not "inside" the BluetoothGattCharacteristic
object.
That means, you should do:
writeCharacteristic(mAlertLevelChar, someData);
instead of:
mAlertLevelChar.setValue(someData);
writeCharacteristic(mAlertLevelChar);
This is to make sure the data you write will not override any data received in a notification, which may happen at the same time.
I use Android-BLE-Library-1.2.0 and Android-nRF-Toolbox-2.6.0, EER: class Request not to find,why?