From 1b00f2c64e3e0eddf6e202cbb69d3ef922396728 Mon Sep 17 00:00:00 2001 From: r-ca Date: Sun, 7 Jan 2024 18:00:40 +0900 Subject: [PATCH] WIP --- .../scanner/ScannerDataManagerStubFragment.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerDataManagerStubFragment.java b/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerDataManagerStubFragment.java index a75d98ae..a599a03a 100644 --- a/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerDataManagerStubFragment.java +++ b/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerDataManagerStubFragment.java @@ -25,13 +25,17 @@ import android.widget.Toast; import java.io.File; import java.io.IOException; import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Date; import java.util.Locale; +import java.util.UUID; import javax.inject.Inject; import one.nem.lacerta.model.document.DocumentDetail; +import one.nem.lacerta.model.document.DocumentMeta; import one.nem.lacerta.processor.DocumentProcessor; import one.nem.lacerta.processor.factory.DocumentProcessorFactory; @@ -146,8 +150,14 @@ public class ScannerDataManagerStubFragment extends Fragment { } public DocumentDetail createSampleDocumentDetail() { - DocumentDetail documentDetail = new DocumentDetail(); - return documentDetail; + + String id = UUID.randomUUID().toString(); + + Toast.makeText(getActivity(), "Generated id: " + id, Toast.LENGTH_LONG).show(); + + DocumentMeta meta = new DocumentMeta( + id, + "Sample" + DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now()), } @Override