Kofax Mobile SDK API Reference
Public Member Functions | List of all members
FixedAspectRatioCaptureExperience Class Reference
Inheritance diagram for FixedAspectRatioCaptureExperience:
DocumentBaseCaptureExperience CaptureExperience StabilityDelayListener LevelnessListener AutoFocusResultListener ImageCapturedListener

Public Member Functions

 FixedAspectRatioCaptureExperience (ImageCaptureView view)
 
 FixedAspectRatioCaptureExperience (ImageCaptureView view, FixedAspectRatioExperienceCriteriaHolder criteria)
 
void setCaptureCriteria (FixedAspectRatioExperienceCriteriaHolder criteria)
 
FixedAspectRatioExperienceCriteriaHolder getCaptureCriteria ()
 
CaptureMessage getHoldSteadyMessage ()
 
CaptureMessage getHoldParallelMessage ()
 
CaptureMessage getCapturedMessage ()
 
void setCenterMessage (CaptureMessage centerMessage)
 
void setZoomInMessage (CaptureMessage zoomInMessage)
 
void setZoomOutMessage (CaptureMessage zoomOutMessage)
 
void setRotateMessage (CaptureMessage message)
 
- Public Member Functions inherited from DocumentBaseCaptureExperience
 DocumentBaseCaptureExperience (ImageCaptureView view, DocumentBaseCaptureExperienceCriteriaHolder criteria)
 
final void addOnImageCapturedListener (ImageCapturedListener listener)
 
final void removeOnImageCapturedListener (ImageCapturedListener listener)
 
final void addAboutToCaptureListener (AboutToCaptureListener listener)
 
final void removeAboutToCaptureListener (AboutToCaptureListener listener)
 
final void addJustCapturedListener (JustCapturedListener listener)
 
final void removeJustCapturedListener (JustCapturedListener listener)
 
final void addOnImageCapturedEventListener (ImageCapturedEventListener listener)
 
final void removeOnImageCapturedEventListener (ImageCapturedEventListener listener)
 
final void setVibrationEnabled (boolean enable)
 Manage vibration after an image is captured. More...
 
boolean isVibrationEnabled ()
 
final void setDiagnosticsViewEnabled (boolean enabled)
 
boolean isDiagnosticsViewEnabled ()
 
void takePicture ()
 
void takePictureContinually ()
 
void stopCapture ()
 
void destroy ()
 
void enableAnimationTutor (boolean enable)
 Sets whether or not to show an animated tutorial about how to capture a document. More...
 
boolean isAnimationTutorEnable ()
 
CaptureMessage getUserInstructionMessage ()
 
void setUserInstructionMessage (CaptureMessage userInstructionsMessage)
 
CaptureMessage getTutorialDismissMessage ()
 
void setTutorialDismissMessage (CaptureMessage tutorialDismissMessage)
 
void setHoldSteadyMessage (CaptureMessage holdSteadyMessage)
 
CaptureMessage getCenterMessage ()
 
CaptureMessage getZoomInMessage ()
 
CaptureMessage getZoomOutMessage ()
 
CaptureMessage getRotateMessage ()
 
void setHoldParallelMessage (CaptureMessage message)
 
void setTiltUpDeviceMessage (CaptureMessage message)
 
void setTiltForwardDeviceMessage (CaptureMessage message)
 
CaptureMessage getTiltUpDeviceMessage ()
 
CaptureMessage getTiltForwardDeviceMessage ()
 
void setCapturedMessage (CaptureMessage capturedMessage)
 
void setOuterViewFinderColor (int colorCode)
 Outer view finder color. More...
 
int getOuterViewFinderColor ()
 
void setGuidanceFrameColor (int colorCode)
 Guidance frame color. More...
 
void setSteadyGuidanceFrameColor (int colorCode)
 Steady guidance frame color. More...
 
int getGuidanceFrameColor ()
 
void setGuidanceFrameThickness (int width)
 Guidance frame Thickness. More...
 
int getGuidanceFrameThickness ()
 
Bitmap getDocumentSampleImage ()
 
void setDocumentSampleImage (Bitmap documentSampleImage)
 
void addPageDetectionListener (PageDetectionListener listener)
 
void removePageDetectionListener (PageDetectionListener listener)
 
- Public Member Functions inherited from CaptureExperience
void onImageCaptured (ImageCapturedEvent event)
 Invoked when the camera captures an image. More...
 
void onAutoFocus (AutoFocusResultEvent event)
 Invoked when the camera completes focusing. More...
 
void onLevelness (LevelnessEvent event)
 Invoked when the orientation of the device changes. More...
 
void onStabilityDelay (StabilityDelayEvent event)
 Invoked when stability levels change. More...
 

Additional Inherited Members

- Protected Member Functions inherited from DocumentBaseCaptureExperience
void initBase (ImageCaptureView view, IDetectionAdapter adapter, DocumentBaseCaptureExperienceCriteriaHolder criteria)
 
- Protected Member Functions inherited from CaptureExperience
void invokeImageCapturedListeners (ImageCapturedEvent event)
 
boolean captureCriteriaMetInternal (CaptureExperienceData data)
 
- Protected Attributes inherited from DocumentBaseCaptureExperience
Context _ctx
 
- Protected Attributes inherited from CaptureExperience
CaptureExperienceData _captureExperienceData = new CaptureExperienceData()
 
final Object _lock
 
boolean _sdkCaptureRequested
 
boolean _continuousCapture
 
ImageCaptureView _imageCaptureView
 
final Handler _uiHandler = new Handler(Looper.getMainLooper())
 
float _aspectRatio
 
Set< ImageCapturedListener_imageCapturedListeners = new LinkedHashSet<ImageCapturedListener>()
 
Vibrator _vibrator
 
boolean _vibrationEnabled = false
 

Detailed Description

This class is responsible for rendering an enhanced visual experience on an ImageCaptureView and provides feedback to guide the user to take a clear, legible and optimally zoomed in photo of a document. Criteria of such a document can be specified by using a setCaptureCriteria(FixedAspectRatioExperienceCriteriaHolder) method.

A photo will be taken automatically once the specified criteria are met, and takePicture() or takePictureContinually() has been called.

We recommend to use this experience for ID capture and Credit cards capture.

Note: FixedAspectRatioCaptureExperience is best used on a view that occupies the maximum possible area of its parent view.

Constructor & Destructor Documentation

◆ FixedAspectRatioCaptureExperience() [1/2]

Constructs an experience on a given ImageCaptureView.

Parameters
viewThe ImageCaptureView this will be drawn onto

◆ FixedAspectRatioCaptureExperience() [2/2]

Constructs an experience on a given ImageCaptureView with specific FixedAspectRatioExperienceCriteriaHolder

Parameters
viewThe ImageCaptureView this will be drawn onto
criteriaThe criteria used to determine if a photo should be taken

Member Function Documentation

◆ getCaptureCriteria()

Returns the criteria used to determine if a photo should be taken.

Returns
FixedAspectRatioCaptureExperienceCriteriaHolder
See also
FixedAspectRatioExperienceCriteriaHolder

◆ getCapturedMessage()

CaptureMessage getCapturedMessage ( )

Returns the attributes of the message that will be displayed when a document is captured.

Default configuration:

  • message: "Done!"
  • text color: green
  • background color: black with 0.7 alpha component
  • background drawable: not specified
  • text size: 16
  • typeface: not specified
  • messageIcons: checkmark icon from package resource stream
    Icon is placed inside of the balloon. Its position and size depend on the balloon and text size.
    Icon will be centered inside balloon if there is no text message, otherwise it will be horizontally centered and shifted to the top.
    Icon is scaled to fit available balloon space with fixed aspect ratio.
  • orientation: CaptureMessage.KUIMessageOrientation#PORTRAIT
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage
See also
setCapturedMessage(CaptureMessage)
CaptureMessage

Reimplemented from DocumentBaseCaptureExperience.

◆ getHoldParallelMessage()

CaptureMessage getHoldParallelMessage ( )

Returns the attributes of the message that will be displayed when the capture experience needs to instruct the user to hold the device more level.
The levelness thresholds can be set using the CaptureExperienceCriteriaHolder#setPitchThreshold(int) and CaptureExperienceCriteriaHolder#setRollThreshold(int) methods.

Default configuration:

  • message: "Hold Device Level"
  • text color: white
  • background color: black with 0.7 alpha component
  • background drawable: not specified
  • text size: 20
  • typeface: not specified
  • messageIcons: hold parallel icons from package resource stream
    Icon is placed inside of the balloon. Its position and size depend on the balloon and text size.
    Icon will be centered inside balloon if there is no text message, otherwise it will be horizontally centered and shifted to the top.
    Icon is scaled to fit available balloon space with fixed aspect ratio.
  • orientation: CaptureMessage.KUIMessageOrientation#PORTRAIT
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage
See also
setHoldParallelMessage(CaptureMessage)
CaptureMessage

Reimplemented from DocumentBaseCaptureExperience.

◆ getHoldSteadyMessage()

CaptureMessage getHoldSteadyMessage ( )

Returns the attributes of the message that is displayed on the capture control to direct the user to hold the device steady so that a clear focused image can be captured. This message is shown when all the constraints are met and ready to capture.

Default configuration:

  • message: "Hold Steady"
  • text color: red
  • background color: black with 0.7 alpha component
  • background drawable: not specified
  • text size: 16
  • typeface: not specified
  • messageIcons: camera icons from package resource stream
    Icon is placed inside of the balloon. Its position and size depend on the balloon and text size.
    Icon will be centered inside balloon if there is no text message, otherwise it will be horizontally centered and shifted to the top.
    Icon is scaled to fit available balloon space with fixed aspect ratio.
  • orientation: CaptureMessage.KUIMessageOrientation#PORTRAIT
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage
See also
setHoldSteadyMessage(CaptureMessage)
CaptureMessage

Reimplemented from DocumentBaseCaptureExperience.

◆ setCaptureCriteria()

void setCaptureCriteria ( FixedAspectRatioExperienceCriteriaHolder  criteria)

Calling this method will cause all of the capture related parameters to be configured

Parameters
criteriaThe criteria used to determine if a photo should be taken
See also
FixedAspectRatioExperienceCriteriaHolder

◆ setCenterMessage()

void setCenterMessage ( CaptureMessage  centerMessage)

This instruction is not supported, always set to invisible.

Parameters
centerMessage: CaptureMessage
See also
getCenterMessage()
CaptureMessage

Reimplemented from DocumentBaseCaptureExperience.

◆ setRotateMessage()

void setRotateMessage ( CaptureMessage  message)

This instruction is not supported, always set to invisible.

Parameters
messageCaptureMessage
See also
getRotateMessage()
CaptureMessage

Reimplemented from DocumentBaseCaptureExperience.

◆ setZoomInMessage()

void setZoomInMessage ( CaptureMessage  zoomInMessage)

This instruction is not supported, always set to invisible.

Parameters
zoomInMessage: CaptureMessage
See also
getZoomInMessage()
CaptureMessage

Reimplemented from DocumentBaseCaptureExperience.

◆ setZoomOutMessage()

void setZoomOutMessage ( CaptureMessage  zoomOutMessage)

This instruction is not supported, always set to invisible.

Parameters
zoomOutMessage: CaptureMessage
See also
getZoomOutMessage()
CaptureMessage

Reimplemented from DocumentBaseCaptureExperience.


The documentation for this class was generated from the following file:
Untitled Document © 2021 Kofax, Inc. All rights reserved. Use is subject to license terms.