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

Public Member Functions

 PassportCaptureExperience (ImageCaptureView view)
 
 PassportCaptureExperience (ImageCaptureView view, PassportCaptureExperienceCriteriaHolder criteria)
 
CaptureMessage getUserInstructionMessage ()
 
void setUserInstructionMessage (CaptureMessage userInstructionsMessage)
 
CaptureMessage getCenterMessage ()
 
void setCenterMessage (CaptureMessage centerMessage)
 
Bitmap getPassportSampleImage ()
 
void setPassportSampleImage (Bitmap passportSampleImage)
 
void setCaptureCriteria (PassportCaptureExperienceCriteriaHolder criteria)
 
PassportCaptureExperienceCriteriaHolder getCaptureCriteria ()
 
- 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)
 
CaptureMessage getHoldSteadyMessage ()
 
void setHoldSteadyMessage (CaptureMessage holdSteadyMessage)
 
void setCenterMessage (CaptureMessage centerMessage)
 
CaptureMessage getCenterMessage ()
 
void setZoomInMessage (CaptureMessage zoomInMessage)
 
CaptureMessage getZoomInMessage ()
 
void setZoomOutMessage (CaptureMessage zoomOutMessage)
 
CaptureMessage getZoomOutMessage ()
 
void setRotateMessage (CaptureMessage message)
 
CaptureMessage getRotateMessage ()
 
void setHoldParallelMessage (CaptureMessage message)
 
CaptureMessage getHoldParallelMessage ()
 
void setTiltUpDeviceMessage (CaptureMessage message)
 
void setTiltForwardDeviceMessage (CaptureMessage message)
 
CaptureMessage getTiltUpDeviceMessage ()
 
CaptureMessage getTiltForwardDeviceMessage ()
 
void setCapturedMessage (CaptureMessage capturedMessage)
 
CaptureMessage getCapturedMessage ()
 
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 addOnImageCapturedListener (ImageCapturedListener listener)
 
void removeOnImageCapturedListener (ImageCapturedListener listener)
 
void setVibrationEnabled (boolean enable)
 
boolean isVibrationEnabled ()
 
void takePicture ()
 
void takePictureContinually ()
 
void stopCapture ()
 
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...
 
void destroy ()
 

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 the 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 passport. Criteria of such a passport can be specified by using a setCaptureCriteria(PassportCaptureExperienceCriteriaHolder) method.

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

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

Constructor & Destructor Documentation

Constructs an experience on a given ImageCaptureView.

Parameters
viewThe ImageCaptureView this will be drawn onto

Constructs an experience on a given ImageCaptureView with specific PassportCaptureExperienceCriteriaHolder

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

Member Function Documentation

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

Returns
PassportCaptureExperienceCriteriaHolder
See also
PassportCaptureExperienceCriteriaHolder
CaptureMessage getCenterMessage ( )

Returns the attributes of the message that is displayed when document is not enough centered in the target frame for capture.

Default configuration:

  • message: "Center Passport"
  • text color: white
  • background color: black with 0.7 alpha component
  • background drawable: not specified
  • text size: 16
  • typeface: not specified
  • messageIcons: not specified
  • orientation: CaptureMessage.KUIMessageOrientation#LANDSCAPE
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage The center message
See also
setCenterMessage(CaptureMessage)
CaptureMessage
Bitmap getPassportSampleImage ( )

The Bitmap of a sample passport that is displayed over the passport frame area when the animated tutorial is enabled.

Returns
Bitmap The sample passport image
See also
DocumentBaseCaptureExperience::setDocumentSampleImage(android.graphics.Bitmap)
CaptureMessage getUserInstructionMessage ( )

Returns the attributes of the instruction message that is displayed on the capture control while the user is trying to capture. This instruction will be displayed during periods where other guidance is not available to correct a user. This may happen in particular when the user is holding a device far away from a document, preventing detection.

The following CaptureMessage property methods are not supported for this message: getMessageIcons() / setMessageIcons(Bitmap[]).

Default configuration:

  • message: "Fill viewable area with passport"
  • text color: white
  • background color: transparent
  • background drawable: not specified
  • text size: 32
  • typeface: not specified
  • orientation: CaptureMessage.KUIMessageOrientation#LANDSCAPE
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage The instruction capture message
See also
CaptureMessage
void setCaptureCriteria ( PassportCaptureExperienceCriteriaHolder  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
PassportCaptureExperienceCriteriaHolder
void setCenterMessage ( CaptureMessage  centerMessage)

This instruction will be displayed when document is not centered in the target frame

Parameters
centerMessageThe center message
See also
CaptureMessage
void setPassportSampleImage ( Bitmap  passportSampleImage)

The specified Bitmap of a sample passport is displayed over the passport frame area when the animated tutorial is enabled. The sample passport image is stretched if necessary to fill the entire passport frame area. While the tutorial is running, MICR and guidance animation are superimposed over the image. A default passport sample image is used if this is not set by the app.

Parameters
passportSampleImageThe sample passport image
See also
enableAnimationTutor(boolean)
void setUserInstructionMessage ( CaptureMessage  userInstructionsMessage)

A property to configure the attributes of the instruction message that is displayed on the capture control while user is trying to capture.

Parameters
userInstructionsMessage: CaptureMessage
See also
CaptureMessage

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