From 0946fa80f157fe14e00f0f4f94056a70e083e123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Wed, 20 Dec 2023 12:12:35 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AD=E3=82=B0=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/scanner/ScannerDataManagerStubFragment.java | 6 ++++++ 1 file changed, 6 insertions(+) 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 ddfebe6f..4095b14d 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 @@ -10,6 +10,7 @@ import androidx.activity.result.contract.ActivityResultContracts; import androidx.fragment.app.Fragment; import android.provider.MediaStore; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -65,10 +66,15 @@ public class ScannerDataManagerStubFragment extends Fragment { super.onViewCreated(view, savedInstanceState); view.findViewById(R.id.button_call_camera).setOnClickListener(v -> { + Log.d("ScannerDataManagerStubFragment", "button_call_camera clicked"); Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); if (takePictureIntent.resolveActivity(requireActivity().getPackageManager()) != null) { + Log.d("ScannerDataManagerStubFragment", "camera available"); cameraLauncher.launch(takePictureIntent); } + else { + Log.d("ScannerDataManagerStubFragment", "camera not available"); + } }); } } \ No newline at end of file