ScanFragment

abstract class ScanFragment : Fragment

Fragment managing the access to the camera and holding a preview. The activity including this fragment needs to initialize the camera by calling initializeCamera in Activity#onResume() after making sure the application has the permission to use the camera.

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
interface Callback
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun initializeCamera()
Setup the camera and start the preview.
Link copied to clipboard
abstract fun resetBorderDetection()
Link copied to clipboard
Link copied to clipboard
abstract fun setFlashMode(@NonNull flashMode: FlashMode)
Set the camera flash mode.
Link copied to clipboard
abstract fun setFocusIndicator(@Nullable focusIndicator: FocusIndicator)
Link copied to clipboard
abstract fun setJpegQuality(jpegQuality: Int)
Set the JPEG quality of camera output pictures.
Link copied to clipboard
abstract fun setOverlayColor(@ColorInt color: Int)
Link copied to clipboard
abstract fun setOverlayColorResource(@ColorRes colorResId: Int)
Link copied to clipboard
abstract fun setPreviewAspectFill(isAspectFill: Boolean)
Link copied to clipboard
abstract fun setPreviewEnabled(enabled: Boolean)
Link copied to clipboard
abstract fun setRealTimeDetectionEnabled(enabled: Boolean)
Link copied to clipboard
abstract fun takePicture(callback: ImageCaptureCallback): Boolean

abstract fun takePicture(callback: ImageCaptureCallback, focusBeforeTrigger: Boolean): Boolean
Stop the real-time border detection and capture the image
Link copied to clipboard
Toggle the flash mode to the next available flash mode.