Class CameraLocationPhotoController
- java.lang.Object
-
- com.cmput301w23t09.qrhunter.scanqr.camera.CameraController
-
- com.cmput301w23t09.qrhunter.scanqr.camera.CameraLocationPhotoController
-
public class CameraLocationPhotoController extends CameraController
Enables the ImageCapture camera use case to let players take location photos.- See Also:
CameraController
-
-
Field Summary
-
Fields inherited from class com.cmput301w23t09.qrhunter.scanqr.camera.CameraController
CAMERA_PERMISSIONS, cameraExecutor, fragment, previewView, REQUEST_CODE_PERMISSIONS
-
-
Constructor Summary
Constructors Constructor Description CameraLocationPhotoController(LocationPhotoFragment fragment, androidx.camera.view.PreviewView previewView, LocationPhotoController controller)Creates a CameraLocationPhotoController that can take location photos
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidsetupCamera(com.google.common.util.concurrent.ListenableFuture<androidx.camera.lifecycle.ProcessCameraProvider> cameraProviderFuture)Enables the camera to take photos using the ImageCapture use case-
Methods inherited from class com.cmput301w23t09.qrhunter.scanqr.camera.CameraController
cameraPermissionsGranted, onDestroy, startCamera
-
-
-
-
Constructor Detail
-
CameraLocationPhotoController
public CameraLocationPhotoController(LocationPhotoFragment fragment, androidx.camera.view.PreviewView previewView, LocationPhotoController controller)
Creates a CameraLocationPhotoController that can take location photos- Parameters:
fragment- The fragment that uses the camerapreviewView- The UI element in fragment to show camera preview oncontroller- location photo controller
-
-
Method Detail
-
setupCamera
protected void setupCamera(com.google.common.util.concurrent.ListenableFuture<androidx.camera.lifecycle.ProcessCameraProvider> cameraProviderFuture) throws java.util.concurrent.ExecutionException, java.lang.InterruptedExceptionEnables the camera to take photos using the ImageCapture use case- Specified by:
setupCamerain classCameraController- Parameters:
cameraProviderFuture- The camera's provider object- Throws:
java.util.concurrent.ExecutionException- if setup failsjava.lang.InterruptedException- if setup fails
-
-