Class LocationPhotoController
- java.lang.Object
-
- com.cmput301w23t09.qrhunter.locationphoto.LocationPhotoController
-
- All Implemented Interfaces:
java.io.Serializable
public class LocationPhotoController extends java.lang.Object implements java.io.Serializable
The LocationPhotoController manages the backend logic for letting a user take a location photo
-
-
Constructor Summary
Constructors Constructor Description LocationPhotoController(LocationPhotoFragment fragment, QRCode qrCode, Player activePlayer)
Creates the LocationPhotoController
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setCameraFields(java.util.concurrent.ExecutorService cameraExecutor, androidx.camera.core.ImageCapture imageCapture)
Once the camera use case is set, the LocationPhotoController needs to know the ImageCapture use case and the CameraExecutorvoid
takePhoto()
Takes a picture and adds it to the QRCode
-
-
-
Constructor Detail
-
LocationPhotoController
public LocationPhotoController(LocationPhotoFragment fragment, QRCode qrCode, Player activePlayer)
Creates the LocationPhotoController- Parameters:
fragment
- The LocationPhotoFragment that owns this LocationPhotoControllerqrCode
- The QRCode that the user will add the location photo toactivePlayer
- The current logged in player
-
-
Method Detail
-
setCameraFields
public void setCameraFields(java.util.concurrent.ExecutorService cameraExecutor, androidx.camera.core.ImageCapture imageCapture)
Once the camera use case is set, the LocationPhotoController needs to know the ImageCapture use case and the CameraExecutor- Parameters:
cameraExecutor
- What executes the camera serviceimageCapture
- The ImageCapture use case that lets us take photos- See Also:
CameraLocationPhotoController
-
takePhoto
public void takePhoto()
Takes a picture and adds it to the QRCode
-
-