Package com.geniusscansdk.camera
Class CameraManager
- java.lang.Object
-
- com.geniusscansdk.camera.CameraManager
-
public class CameraManager extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CameraManager(android.app.Activity activity, ScanFragment.Callback callback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getAvailableFlashModes()
int
getCameraDisplayOrientation()
void
initializeCamera()
void
releaseCamera()
void
setFlashMode(java.lang.String flashMode)
void
setJpegQuality(int jpegQuality)
void
startPreview(PreviewSurfaceView previewSurfaceView)
void
stopPreview()
boolean
takePhoto(ImageCaptureCallback callback, boolean focusBeforeTrigger)
java.lang.String
toggleFlashMode()
void
triggerAutoFocus(float x, float y, FocusIndicator focusIndicator)
Trigger auto focus at the specific position, if focus areas are supported
-
-
-
Constructor Detail
-
CameraManager
public CameraManager(android.app.Activity activity, ScanFragment.Callback callback)
-
-
Method Detail
-
initializeCamera
public void initializeCamera()
-
startPreview
public void startPreview(PreviewSurfaceView previewSurfaceView)
-
stopPreview
public void stopPreview()
-
releaseCamera
public void releaseCamera()
-
takePhoto
public boolean takePhoto(ImageCaptureCallback callback, boolean focusBeforeTrigger)
- Parameters:
callback
- the file in which the picture should be savedfocusBeforeTrigger
- if true, an auto-focus will run before the picture is captured- Returns:
- false if a picture is already being taken, true otherwise
-
setJpegQuality
public void setJpegQuality(int jpegQuality)
-
getAvailableFlashModes
@Nullable public java.util.List<java.lang.String> getAvailableFlashModes()
-
setFlashMode
public void setFlashMode(java.lang.String flashMode)
-
toggleFlashMode
@Nullable 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- Parameters:
x
- center of the focus area relative to the surface view widthy
- center of the focus area relative to the surface view height
-
getCameraDisplayOrientation
public int getCameraDisplayOrientation()
-
-