NordicSemiconductor / Android-nRF-Toolbox

The nRF Toolbox is a container app that stores your Nordic Semiconductor apps for Bluetooth Low Energy in one location.
https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Toolbox
BSD 3-Clause "New" or "Revised" License
1.07k stars 461 forks source link

Unable to find writeCharacteristic(BluetoothGattCharacteristic) in Android-nRF-Toolbox #51

Closed R3MX13 closed 6 years ago

R3MX13 commented 6 years ago

In class CGMSManager, GlucoseManager, ProximityManager.

error: no suitable method found for writeCharacteristic(BluetoothGattCharacteristic) method BleManager.writeCharacteristic(BluetoothGattCharacteristic,byte[]) is not applicable (actual and formal argument lists differ in length) method BleManager.writeCharacteristic(BluetoothGattCharacteristic,byte[],int) is not applicable (actual and formal argument lists differ in length)

In Ble Manager I add the missing function

/**
 * Writes the characteristic value to the given characteristic.
 * The write type will be read from the characteristic.
 *
 * @param characteristic the characteristic to write to
 * @return true if request has been enqueued
 */
protected final boolean writeCharacteristic(final BluetoothGattCharacteristic characteristic) {
    return enqueue(Request.newWriteRequest(characteristic, characteristic.getValue()));
}
philips77 commented 6 years ago

True, modify it to use a variant with byte[] instead.

philips77 commented 6 years ago

I've updated the lib yesterday and didn't have time to update the project.