mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
サンプルにパスを追加
This commit is contained in:
1 file changed
+11
-1
+11
-1
@@ -37,11 +37,14 @@ import javax.inject.Inject;
|
|||||||
import dagger.hilt.android.AndroidEntryPoint;
|
import dagger.hilt.android.AndroidEntryPoint;
|
||||||
import one.nem.lacerta.model.document.DocumentDetail;
|
import one.nem.lacerta.model.document.DocumentDetail;
|
||||||
import one.nem.lacerta.model.document.DocumentMeta;
|
import one.nem.lacerta.model.document.DocumentMeta;
|
||||||
|
import one.nem.lacerta.model.document.path.DocumentPath;
|
||||||
import one.nem.lacerta.processor.DocumentProcessor;
|
import one.nem.lacerta.processor.DocumentProcessor;
|
||||||
import one.nem.lacerta.processor.factory.DocumentProcessorFactory;
|
import one.nem.lacerta.processor.factory.DocumentProcessorFactory;
|
||||||
|
|
||||||
import one.nem.lacerta.utils.LacertaLogger;
|
import one.nem.lacerta.utils.LacertaLogger;
|
||||||
|
|
||||||
|
import one.nem.lacerta.utils.repository.DeviceInfoUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple {@link Fragment} subclass.
|
* A simple {@link Fragment} subclass.
|
||||||
* Use the {@link ScannerDataManagerStubFragment#newInstance} factory method to
|
* Use the {@link ScannerDataManagerStubFragment#newInstance} factory method to
|
||||||
@@ -67,6 +70,9 @@ public class ScannerDataManagerStubFragment extends Fragment {
|
|||||||
@Inject
|
@Inject
|
||||||
LacertaLogger logger;
|
LacertaLogger logger;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
DeviceInfoUtils deviceInfoUtils;
|
||||||
|
|
||||||
private final ActivityResultLauncher<Intent> cameraLauncher = registerForActivityResult(
|
private final ActivityResultLauncher<Intent> cameraLauncher = registerForActivityResult(
|
||||||
new ActivityResultContracts.StartActivityForResult(),
|
new ActivityResultContracts.StartActivityForResult(),
|
||||||
result -> {
|
result -> {
|
||||||
@@ -178,7 +184,11 @@ public class ScannerDataManagerStubFragment extends Fragment {
|
|||||||
new Date(),
|
new Date(),
|
||||||
new Date());
|
new Date());
|
||||||
|
|
||||||
return new DocumentDetail(meta, null, "SampleAuthor", "SampleDefaultBranch");
|
DocumentPath path = new DocumentPath(
|
||||||
|
deviceInfoUtils.getExternalStorageDirectoryString(),
|
||||||
|
"Sample" + DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now()));
|
||||||
|
|
||||||
|
return new DocumentDetail(meta, path, "SampleAuthor", "SampleDefaultBranch");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in new issue
Block a user