boolean notifyPacketSent(@NonNull final BluetoothDevice device, @Nullable final byte[] data) {
		final int currentCount = count;
		final byte[] currentChunk = this.currentChunk;
		handler.post(() -> {
			if (progressCallback != null) {
				try {
					progressCallback.onPacketSent(device, currentChunk, currentCount);
				} catch (final Throwable t) {
					Log.e(TAG, "Exception in Progress callback", t);
				}
			}
		});
		count++;
		if (complete) {
			handler.post(() -> {
				if (valueCallback != null) {
					try {
						valueCallback.onDataSent(device, new Data(WriteRequest.this.data));
					} catch (final Throwable t) {
						Log.e(TAG, "Exception in Value callback", t);
					}
				}
			});
		}
		if (writeType == BluetoothGattCharacteristic.WRITE_TYPE_DEFAULT) {
			// Compare the data received with the data sent.
			return Arrays.equals(data, currentChunk);
		} else {
			// Don't check the data when using Write Without Response.
			return true;
		}
	}
Method called when packet has been sent and confirmed (when Write With Response was used),
or added to local outgoing buffer (when Write Without Response was used).

@param device the target device.
@param data   the data received in the
              {@link android.bluetooth.BluetoothGattCallback#onCharacteristicWrite(BluetoothGatt, BluetoothGattCharacteristic, int)}.
@return True, if the data received are equal to data sent.
ble/src/main/java/no/nordicsemi/android/ble/WriteRequest.java