summaryrefslogtreecommitdiffstats
path: root/src/android
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2017-01-17 15:17:10 +0100
committerAlex Blasche <alexander.blasche@qt.io>2017-01-24 14:49:13 +0000
commit6b0595b64ea46554a8a63f026c15ab07ea804285 (patch)
tree97a469bd455cbe32ee7dfc23a79c05cb9b7e41dd /src/android
parenta8604157818e21d7b70e2853258fc4569db770be (diff)
Android: Implement QLEService::characteristicChanged() for peripheral mode
Emits the above signal when the remote client successfully updates a characteristic. Change-Id: I236b1f92b682028bc10be798192f46bffc981101 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java b/src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java
index 910143dd..b283a4b3 100644
--- a/src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java
+++ b/src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java
@@ -165,6 +165,7 @@ public class QtBluetoothLEServer {
if (!preparedWrite) { // regular write
if (offset == 0) {
characteristic.setValue(value);
+ leServerCharacteristicChanged(qtObject, characteristic, value);
} else {
// This should not really happen as per Bluetooth spec
Log.w(TAG, "onCharacteristicWriteRequest: !preparedWrite, offset " + offset + ", Not supported");
@@ -345,5 +346,7 @@ public class QtBluetoothLEServer {
public native void leServerConnectionStateChange(long qtObject, int errorCode, int newState);
public native void leServerAdvertisementError(long qtObject, int status);
-
+ public native void leServerCharacteristicChanged(long qtObject,
+ BluetoothGattCharacteristic characteristic,
+ byte[] newValue);
}