Scanbot Camera XView
Wrapper view for CameraX.
Types
Properties
Delay that camera will took before snap on auto focus complete called from camera core in ms. For some devices this callback could call even before real auto focus completed, so we need to take some delay before snapping. Usually you can set 500ms. By default it is set to 20ms.
Sets lifecycle owner for camera view. N/A for ScanbotCameraView implementation. Setting null
means view will attempt to resolve lifecycle on its own.
Set whether camera should use the front camera in mirror mode for data detection. Helps with detection of mrz and other ocr related data with front camera. By default, it is set to true
.
TODO: desperately needs documentation!!!
TODO: desperately needs documentation!!!
Functions
Adds callback which will be notified about camera state changes. Callbacks are invoked on a main thread.
Used to add FrameHandler that will be called on each next frame.
Adds callback which will be notified when picture will be taken. Callbacks are invoked on a worker thread, so you can safely perform "heavy" operations here.
Adds callback which will be notified about take picture operation process. Callbacks are invoked on a main thread.
Cancels auto-focus and performs continuous-focus. Should be executed from the main thread and when camera is opened
Stops camera preview stream but leaving detection enabled. Internal Use Only!
Obtain FrameHandler instance of type clazz, that is attached to the view (if any).
Returns the current state of the flashlight Should be executed from the main thread and when camera is opened
Set whether camera should use snapping animation. By default set to true
This parameter works only with ScanbotCameraXView
enabled
Locks the min supported focus distance and disables continuous focus
Locks camera in landscape mode
Locks camera in portrait mode
Removes callback, so it won't receive any further notifications.
Unregisters given FrameHandler instance.
Removes callback, so it won't receive any further notifications.
Removes callback, so it won't receive any further notifications.
Restarts preview stream.
Set whether camera analyzer should be enabled or not. By default, the analyzer is enabled.
Limit the frame rate of the camera analyzer. By default, the frame rate is set to the maximum possible value.
Set camera analyzer frame size. Make sure to set the size with the correct orientation.
Set camera preview and analyzer frame size. Make sure to set the size with the correct orientation.
Defines a camera module. By default is CameraModule.BACK.
Callback which will be invoked when camera will be opened
Sets the callback which will be notified about the moment of actual image capture.
Set whether camera should force maximum possible quality of snapped picture. As a result snapping speed could be significantly slower and result image could be bigger. By default set to false
This parameter works only with ScanbotCameraXView
enabled
Set whether camera should force maximum possible size of snapped picture or use maximum size that available with the same aspect ratio as preview By default set to false
This parameter works only with ScanbotCameraXView
enabled
Set whether camera should be able to take pictures. By default, the camera is able to take pictures.
Allows to set camera physical zoom value, if the value out of range of real camera min and max values it chooses min or max value. Example: camera physical zoom range 1f..5f if we set 6f it will set 5f. Default value is 1f.
Set custom zoom range. Default value is ZoomRange(0.5f, 100f).
Set camera picture size. Make sure to set the size with the correct orientation.
Set camera preview frame size. Make sure to set the size with the correct orientation.
Set the camera preview mode. By default - CameraPreviewMode.FILL_IN.
Set camera preview frame rotation. Rotation is one of four valid values: Surface.ROTATION_0, Surface.ROTATION_90, Surface.ROTATION_180, Surface.ROTATION_270. Rotation values are relative to the "natural" rotation, Surface.ROTATION_0. By default, the camera preview frame rotation is same as display rotation.
Set camera shutter sound state. true
if system sound should be played on the take picture event, false
- otherwise. By default, the camera plays the system-defined camera shutter sound when takePicture() is called.
Set whether camera should automatically adjusts the final image with the surrounding scenery. For example, the vendor library implementation might do low-light detection and switch to low-light mode or HDR to take the picture. Alternatively, the face retouch mode could be automatically applied when taking a portrait image. This delegates modes to the vendor library implementation to decide.
Passes the zoom value to the dependent view
Starts/resumes camera preview stream. Usually used after picture was taken. Note, the preview is started by default only once after the view is attached, so it's required to call it if the preview was stopped and the view was not reattached.
Stops camera preview stream.
Takes picture.
Resume camera preview stream after the freeze. Internal Use Only!
Unlocks camera orientation
Enables/disables Pinch-to-Zoom camera functionality