private native static void caLeGattServerConnectionStateChangeCallback(
BluetoothDevice device, int status, int newState);
+ private native static void caLeGattServerNWConnectionStateChangeCallback(
+ BluetoothDevice device, int status, int newState);
+
private native static void caLeGattServerServiceAddedCallback(int status,
BluetoothGattService service);
BluetoothDevice device, byte[] data);
private native static void caLeGattServerCharacteristicWriteRequestCallback(
- BluetoothDevice device, byte[] data);
+ BluetoothDevice device, byte[] data, int id, int offset, byte[] value);
private native static void caLeGattServerNotificationSentCallback(BluetoothDevice device,
int status);
+ private native static void caLeGattServerMtuChangedCallback(BluetoothDevice gatt, int mtu);
+
// AdvertiseCallback
private native static void caLeAdvertiseStartSuccessCallback(
AdvertiseSettings settingsInEffect);
super.onConnectionStateChange(device, status, newState);
caLeGattServerConnectionStateChangeCallback(device, status, newState);
+ caLeGattServerNWConnectionStateChangeCallback(device, status, newState);
}
@Override
super.onCharacteristicWriteRequest(device, requestId, characteristic,
preparedWrite, responseNeeded, offset, value);
- caLeGattServerCharacteristicWriteRequestCallback(device, value);
+ caLeGattServerCharacteristicWriteRequestCallback(device, value, requestId,
+ offset, value);
}
@Override
caLeGattServerNotificationSentCallback(device, status);
}
+
+ @Override
+ public void onMtuChanged(BluetoothDevice device, int mtu) {
+ super.onMtuChanged(device, mtu);
+
+ caLeGattServerMtuChangedCallback(device, mtu);
+ }
};
private static final AdvertiseCallback mAdvertiseCallback = new AdvertiseCallback() {