final void onCharacteristicWriteRequest(@NonNull final BluetoothGattServer server,
											@NonNull final BluetoothDevice device, final int requestId,
											@NonNull final BluetoothGattCharacteristic characteristic,
											final boolean preparedWrite, final boolean responseNeeded,
											final int offset, @NonNull final byte[] value) {
		log(Log.DEBUG, () ->
				"[Server callback] Write " + (responseNeeded ? "request" : "command")
				+ " to characteristic " + characteristic.getUuid()
				+ " (requestId=" + requestId + ", prepareWrite=" + preparedWrite + ", responseNeeded="
				+ responseNeeded + ", offset: " + offset + ", value=" + ParserUtils.parseDebug(value) + ")");
		if (offset == 0) {
			log(Log.INFO, () -> {
				final String type = responseNeeded ? "WRITE REQUEST" : "WRITE COMMAND";
				final String option = preparedWrite ? "Prepare " : "";
				return "[Server] " + option + type + " for characteristic " + characteristic.getUuid()
						+ " received, value: " + ParserUtils.parse(value);
			});
		}

		if (responseNeeded) {
			sendResponse(server, device, BluetoothGatt.GATT_SUCCESS, requestId, offset, value);
		}

		// If Prepare Write or Long Write is sent, store the data in a temporary queue until it's executed.
		if (preparedWrite) {
			if (preparedValues == null) {
				preparedValues = new LinkedList<>();
			}
			if (offset == 0) {
				// Add new value to the operations.
				preparedValues.offer(new Pair<>(characteristic, value));
			} else {
				// Concatenate the value to the end of previous value, if the previous request was
				// also for the same characteristic.
				final Pair<Object, byte[]> last = preparedValues.peekLast();
				if (last != null && characteristic.equals(last.first)) {
					preparedValues.pollLast();
					preparedValues.offer(new Pair<>(characteristic, Bytes.concat(last.second, value, offset)));
				} else {
					prepareError = BluetoothGatt.GATT_INVALID_OFFSET;
				}
			}
		} else {
			// Otherwise, save the data immediately.
			if (assignAndNotify(device, characteristic, value) || checkCondition()) {
				nextRequest(true);
			}
		}
	}
Callback indicating the connection parameters were updated. Works on Android 8+.

@param gatt     GATT client involved.
@param interval Connection interval used on this connection, 1.25ms unit.
                Valid range is from 6 (7.5ms) to 3200 (4000ms).
@param latency  Slave latency for the connection in number of connection events.
                Valid range is from 0 to 499.
@param timeout  Supervision timeout for this connection, in 10ms unit.
                Valid range is from 10 (0.1s) to 3200 (32s)
@param status   {@link BluetoothGatt#GATT_SUCCESS} if the connection has been updated
                successfully.
ble/src/main/java/no/nordicsemi/android/ble/BleManagerHandler.java