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 fc11c575..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 @@ -68,7 +68,7 @@ public class ScannerDataManagerStubFragment extends Fragment { 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(getActivity().getPackageManager()) != null) { + if (takePictureIntent.resolveActivity(requireActivity().getPackageManager()) != null) { Log.d("ScannerDataManagerStubFragment", "camera available"); cameraLauncher.launch(takePictureIntent); }