mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
サンプルにパスを追加
This commit is contained in:
parent
2b4a24de7c
commit
2f0460a9ea
|
@ -37,11 +37,14 @@ import javax.inject.Inject;
|
|||
import dagger.hilt.android.AndroidEntryPoint;
|
||||
import one.nem.lacerta.model.document.DocumentDetail;
|
||||
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.factory.DocumentProcessorFactory;
|
||||
|
||||
import one.nem.lacerta.utils.LacertaLogger;
|
||||
|
||||
import one.nem.lacerta.utils.repository.DeviceInfoUtils;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
* Use the {@link ScannerDataManagerStubFragment#newInstance} factory method to
|
||||
|
@ -67,6 +70,9 @@ public class ScannerDataManagerStubFragment extends Fragment {
|
|||
@Inject
|
||||
LacertaLogger logger;
|
||||
|
||||
@Inject
|
||||
DeviceInfoUtils deviceInfoUtils;
|
||||
|
||||
private final ActivityResultLauncher<Intent> cameraLauncher = registerForActivityResult(
|
||||
new ActivityResultContracts.StartActivityForResult(),
|
||||
result -> {
|
||||
|
@ -178,7 +184,11 @@ public class ScannerDataManagerStubFragment extends Fragment {
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user