Class CameraManager

  • public class CameraManager
    extends java.lang.Object
    • Constructor Detail

      • CameraManager

        public CameraManager​( activity,
                             ScanFragment.Callback callback)
    • Method Detail

      • initializeCamera

        public void initializeCamera()
      • stopPreview

        public void stopPreview()
      • releaseCamera

        public void releaseCamera()
      • takePhoto

        public boolean takePhoto​(ImageCaptureCallback callback,
                                 boolean focusBeforeTrigger)
        callback - the file in which the picture should be saved
        focusBeforeTrigger - if true, an auto-focus will run before the picture is captured
        false if a picture is already being taken, true otherwise
      • setJpegQuality

        public void setJpegQuality​(int jpegQuality)
      • getAvailableFlashModes

        public java.util.List<java.lang.String> getAvailableFlashModes()
      • setFlashMode

        public void setFlashMode​(java.lang.String flashMode)
      • toggleFlashMode

        public java.lang.String toggleFlashMode()
      • triggerAutoFocus

        public void triggerAutoFocus​(float x,
                                     float y,
                                     FocusIndicator focusIndicator)
        Trigger auto focus at the specific position, if focus areas are supported
        x - center of the focus area relative to the surface view width
        y - center of the focus area relative to the surface view height
      • getCameraDisplayOrientation

        public int getCameraDisplayOrientation()