Atalasoft MobileImage API Reference
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience Class Referenceabstract
Inheritance diagram for com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience:
com.kofax.kmc.kui.uicontrols.captureanimations.CaptureExperience com.kofax.kmc.kui.uicontrols.StabilityDelayListener com.kofax.kmc.kui.uicontrols.LevelnessListener com.kofax.kmc.kui.uicontrols.AutoFocusResultListener com.kofax.kmc.kui.uicontrols.ImageCapturedListener com.kofax.kmc.kui.uicontrols.captureanimations.CheckCaptureExperience com.kofax.kmc.kui.uicontrols.captureanimations.DocumentCaptureExperience

Public Member Functions

 DocumentBaseCaptureExperience (ImageCaptureView view, DocumentBaseCaptureExperienceCriteriaHolder criteria)
 
final void addOnImageCapturedListener (ImageCapturedListener listener)
 
final void removeOnImageCapturedListener (ImageCapturedListener listener)
 
final void setVibrationEnabled (boolean enable)
 
boolean isVibrationEnabled ()
 
void takePicture ()
 
void takePictureContinually ()
 
void stopCapture ()
 
void destroy ()
 
void enableAnimationTutor (boolean enable)
 
boolean isAnimationTutorEnable ()
 
CaptureMessage getUserInstructionMessage ()
 
void setUserInstructionMessage (CaptureMessage userInstructionsMessage)
 
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 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 ()
 
double getPaddingPercent ()
 
Bitmap getDocumentSampleImage ()
 
void setDocumentSampleImage (Bitmap documentSampleImage)
 
void addPageDetectionListener (PageDetectionListener listener)
 
void removePageDetectionListener (PageDetectionListener listener)
 
- Public Member Functions inherited from com.kofax.kmc.kui.uicontrols.captureanimations.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 ()
 

Protected Member Functions

void initBase (ImageCaptureView view, DocumentBaseCaptureExperienceCriteriaHolder criteria)
 
- Protected Member Functions inherited from com.kofax.kmc.kui.uicontrols.captureanimations.CaptureExperience
void invokeImageCapturedListeners (ImageCapturedEvent event)
 
boolean captureCriteriaMetInternal (CaptureExperienceData data)
 

Protected Attributes

Context _ctx
 
- Protected Attributes inherited from com.kofax.kmc.kui.uicontrols.captureanimations.CaptureExperience
CaptureExperienceData _captureExperienceData = new CaptureExperienceData()
 
final Object _lock
 
boolean _sdkCaptureRequested
 
boolean _continuousCapture
 
ImageCaptureView _imageCaptureView
 
final Handler _uiHandler = new Handler(Looper.getMainLooper())
 
boolean _continuousReset
 
float _aspectRatio
 
Set< ImageCapturedListener_imageCapturedListeners = new LinkedHashSet<ImageCapturedListener>()
 
Vibrator _vibrator
 
boolean _vibrationEnabled = false
 

Detailed Description

This class renders 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 method.

When the criteria are satisfied, a photo can be taken automatically, to enable it use takePicture() or takePictureContinually().

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

Constructor & Destructor Documentation

com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.DocumentBaseCaptureExperience ( ImageCaptureView  view,
DocumentBaseCaptureExperienceCriteriaHolder  criteria 
)
inline

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

Parameters
viewThe view this will be drawn onto
criteriaThe criteria used to determine when a photo should be taken. null is an acceptable value, and will give the default experience

Member Function Documentation

final void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.addOnImageCapturedListener ( ImageCapturedListener  listener)
inline

Invoked after the camera captures an image and when all capture messages were shown. To allow for every message to be played, this method should be used to set an ImageCapturedListener instead of the method on the ImageCaptureView class.

Parameters
listenerThe image captured listener
See also
ImageCapturedListener
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.addPageDetectionListener ( PageDetectionListener  listener)
inline

Adds a listener to be invoked when a page is detected.

Parameters
listenerthe listener
See also
PageDetectionListener
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.destroy ( )
inline

Detaches from the ImageCaptureView and destroys this experience.

void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.enableAnimationTutor ( boolean  enable)
inline
Parameters
enableWhether to show animated instructions or not
CaptureMessage com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.getCapturedMessage ( )
inline

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 and its position and size depends on the balloon size and text message.
    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#LANDSCAPE
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage
See also
setCapturedMessage(CaptureMessage)
CaptureMessage
CaptureMessage com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.getCenterMessage ( )
inline

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

Default configuration:

  • message: "Center Document"
  • 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
See also
setCenterMessage(CaptureMessage)
CaptureMessage
Bitmap com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.getDocumentSampleImage ( )
inline

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

Returns
Bitmap
See also
setDocumentSampleImage(Bitmap)
int com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.getGuidanceFrameColor ( )
inline

Returns the color used for the guidance frame.

Returns
The color used for the guidance frame.
CaptureMessage com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.getHoldParallelMessage ( )
inline

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 and its position and size depends on the balloon size and text message.
    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#LANDSCAPE
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage
See also
setHoldParallelMessage(CaptureMessage)
CaptureMessage
CaptureMessage com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.getHoldSteadyMessage ( )
inline

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 and its position and size depends on the balloon size and text message.
    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#LANDSCAPE
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage
See also
setHoldSteadyMessage(CaptureMessage)
CaptureMessage
int com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.getOuterViewFinderColor ( )
inline

Returns the color used for the outer view finder background.

Returns
The color used for the outer view finder background
double com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.getPaddingPercent ( )
inline

The percentage of the total width and height used as padding for the document overlay image. Valid values are [0-50].

CaptureMessage com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.getRotateMessage ( )
inline

Returns the attributes of the message that will be displayed when the capture experience needs to instruct the user to rotate the device or the document.

Default configuration:

  • message: "Rotate Device"
  • text color: white
  • background color: black with 0.7 alpha component
  • background drawable: not specified
  • text size: 20
  • typeface: not specified
  • messageIcons: change orientation icon from package resource stream
    Icon is placed inside of the balloon and its position and size depends on the balloon size and text message.
    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#LANDSCAPE
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage
See also
setRotateMessage(CaptureMessage)
CaptureMessage
CaptureMessage com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.getUserInstructionMessage ( )
inline

Returns the attributes of the instruction message that is displayed on the capture control while the user is trying to capture. This message 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 too far away from a document, preventing detection.

The following CaptureMessage properties are not supported for this message:

Default configuration:

  • message: "Fill viewable area with document"
  • 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
See also
CaptureMessage
CaptureMessage com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.getZoomInMessage ( )
inline

Returns the attributes of the message that is displayed when the capture experience needs to instruct the user to move the device closer to the target document.

Default configuration:

  • message: "Move Closer"
  • text color: white
  • background color: black with 0.7 alpha component
  • background drawable: not specified
  • text size: 20
  • typeface: not specified
  • messageIcons: zoom in icons from package resource stream
    Icon is placed inside of the balloon and its position and size depends on the balloon size and text message.
    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#LANDSCAPE
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage
See also
setZoomInMessage(CaptureMessage)
CaptureMessage
CaptureMessage com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.getZoomOutMessage ( )
inline

Returns the attributes of the message that will be displayed when the capture experience needs to instruct the user to move the device farther away from the target document.

Default configuration:

  • message: "Move Back"
  • text color: white
  • background color: black with 0.7 alpha component
  • background drawable: not specified
  • text size: 20
  • typeface: not specified
  • messageIcons: zoom out icons from package resource stream
    Icon is placed inside of the balloon and its position and size depends on the balloon size and text message.
    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#LANDSCAPE
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage
See also
setZoomOutMessage(CaptureMessage)
CaptureMessage
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.initBase ( ImageCaptureView  view,
DocumentBaseCaptureExperienceCriteriaHolder  criteria 
)
inlineprotected
boolean com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.isAnimationTutorEnable ( )
inline
Returns
Whether to show animated instructions or not
boolean com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.isVibrationEnabled ( )
inline
Returns
Whether vibration availability during capturing
final void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.removeOnImageCapturedListener ( ImageCapturedListener  listener)
inline

Remove ImageCapturedListener.

Parameters
listenerThe image captured listener
See also
ImageCapturedListener
addOnImageCapturedListener(ImageCapturedListener)
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.removePageDetectionListener ( PageDetectionListener  listener)
inline

Removes page detection listener.

Parameters
listenerthe listener
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.setCapturedMessage ( CaptureMessage  capturedMessage)
inline

This message will be displayed when the document is captured.

Parameters
capturedMessage: CaptureMessage
See also
getCapturedMessage()
CaptureMessage
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.setCenterMessage ( CaptureMessage  centerMessage)
inline

This instruction will be displayed when the document is not centered enough in the target frame for capture.

Parameters
centerMessage: CaptureMessage
See also
getCenterMessage()
CaptureMessage
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.setDocumentSampleImage ( Bitmap  documentSampleImage)
inline

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

Parameters
documentSampleImage: Bitmap
See also
enableAnimationTutor(boolean)
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.setGuidanceFrameColor ( int  colorCode)
inline

Guidance frame color.

Specifies the color that will be used for the guidance frame, for example in the case of check capture. The default color is green.

void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.setHoldParallelMessage ( CaptureMessage  message)
inline

This message will be displayed when the capture experience needs to instruct the user to hold the device more level.

Parameters
messageCaptureMessage
See also
getHoldParallelMessage()
CaptureMessage
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.setHoldSteadyMessage ( CaptureMessage  holdSteadyMessage)
inline

A property to configure 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.

Parameters
holdSteadyMessage: CaptureMessage
See also
getHoldSteadyMessage()
CaptureMessage
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.setOuterViewFinderColor ( int  colorCode)
inline

Outer view finder color.

Specifies the color that will be used for the outer view finder background. The default color is translucent grey.

void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.setRotateMessage ( CaptureMessage  message)
inline

This message will be displayed when the capture experience needs to instruct the user to rotate the device or the document.

Parameters
messageCaptureMessage
See also
getRotateMessage()
CaptureMessage
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.setSteadyGuidanceFrameColor ( int  colorCode)
inline

Steady guidance frame color.

Specifies the color that will be used for the guidance frame when control is ready to capture.

By default is equals to the guidanceFrameColor.

void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.setUserInstructionMessage ( CaptureMessage  userInstructionsMessage)
inline

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

Parameters
userInstructionsMessage: CaptureMessage
See also
getUserInstructionMessage()
CaptureMessage
final void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.setVibrationEnabled ( boolean  enable)
inline

Method to manage vibration availability during capturing.

Parameters
enableWhether to vibrate during capture
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.setZoomInMessage ( CaptureMessage  zoomInMessage)
inline

This message will be displayed when the capture experience needs to instruct the user to move the device closer to the target document.

Parameters
zoomInMessage: CaptureMessage
See also
getZoomInMessage()
CaptureMessage
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.setZoomOutMessage ( CaptureMessage  zoomOutMessage)
inline

This message will be displayed when the capture experience needs to instruct the user to move the device farther away from the target document.

Parameters
zoomOutMessage: CaptureMessage
See also
getZoomOutMessage()
CaptureMessage
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.stopCapture ( )
inline

This is the counterpart to takePicture() and takePictureContinually(). Calling this method will stop automatic image capture when the criteria are satisfied.

See also
takePicture()
takePictureContinually()
void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.takePicture ( )
inline

Calling this method will start the process of monitoring the capture criteria that was configured to determine when a document that meets all the criteria can be captured. The static frame will change its color to green to indicate that a document will be captured soon.

void com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience.takePictureContinually ( )
inline

Calling this method will start the continuous capture of images. Images will automatically be captured when criteria are satisfied. Between each image capture event, the device must be tilted away from its set device declination. This signals the device to capture a new image when criteria are again satisfied.

Member Data Documentation

Context com.kofax.kmc.kui.uicontrols.captureanimations.DocumentBaseCaptureExperience._ctx
protected

The documentation for this class was generated from the following file:
Untitled Document © 2016 Atalasoft, Inc., 116 Pleasant St, Suite 321, Easthampton, MA 01027, U.S.A. All rights reserved. Use is subject to license terms.