Kofax Mobile SDK API Reference
|
Protected Member Functions | |
void | initBase (ImageCaptureView view, IDetectionAdapter adapter, DocumentBaseCaptureExperienceCriteriaHolder criteria) |
Protected Member Functions inherited from CaptureExperience | |
void | invokeImageCapturedListeners (ImageCapturedEvent event) |
boolean | captureCriteriaMetInternal (CaptureExperienceData data) |
Protected Attributes | |
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 |
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.
A photo will be taken automatically once the specified criteria are met, and takePicture() or takePictureContinually() has been called.
Note: DocumentBaseCaptureExperience is best used on a view that occupies the maximum possible area of its parent view.
DocumentBaseCaptureExperience | ( | ImageCaptureView | view, |
DocumentBaseCaptureExperienceCriteriaHolder | criteria | ||
) |
Note: This is best used on a view that occupies tge maximum possible area of its parent view.
view | The view this will be drawn onto |
criteria | The criteria used to determine when a photo should be taken. null is an acceptable value, and will give the default experience |
final void addAboutToCaptureListener | ( | AboutToCaptureListener | listener | ) |
This Callback is to inform the user that image is about to be captured.
listener | The image about to capture listener |
final void addJustCapturedListener | ( | JustCapturedListener | listener | ) |
This Callback is to inform the user that image has been just captured.
listener | The image just captured listener |
final void addOnImageCapturedEventListener | ( | ImageCapturedEventListener | listener | ) |
Invoked after the camera captures an image and identifies glare if glare detection is enabled.
listener | Image Captured Event Listener |
final void addOnImageCapturedListener | ( | ImageCapturedListener | listener | ) |
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.
listener | The image captured listener |
Reimplemented from CaptureExperience.
void addPageDetectionListener | ( | PageDetectionListener | listener | ) |
Adds a listener to be invoked when a page is detected.
listener | the listener |
void destroy | ( | ) |
Detaches from the ImageCaptureView and destroys this experience.
Reimplemented from CaptureExperience.
void enableAnimationTutor | ( | boolean | enable | ) |
Sets whether or not to show an animated tutorial about how to capture a document.
By default, the tutorial isn't shown.
enable | boolean. |
CaptureMessage getCapturedMessage | ( | ) |
Returns the attributes of the message that will be displayed when a document is captured.
Default configuration:
Reimplemented in FixedAspectRatioCaptureExperience.
CaptureMessage getCenterMessage | ( | ) |
Returns the attributes of the message that is displayed when the document is not centered enough for capture.
Default configuration:
Reimplemented in CheckCaptureExperience, and PassportCaptureExperience.
Bitmap getDocumentSampleImage | ( | ) |
The Bitmap of a sample document that is displayed over the document frame area when the animated tutorial is enabled.
int getGuidanceFrameColor | ( | ) |
Returns the color used for the guidance frame.
int getGuidanceFrameThickness | ( | ) |
Returns the thickness value of the guidance frame line in Denisty-indepenent Pixels(dp).
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:
Reimplemented in FixedAspectRatioCaptureExperience.
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:
Reimplemented in FixedAspectRatioCaptureExperience.
int getOuterViewFinderColor | ( | ) |
Returns the color used for the outer view finder background.
CaptureMessage getRotateMessage | ( | ) |
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:
CaptureMessage getTiltForwardDeviceMessage | ( | ) |
Returns the attributes of the message that will be displayed when the capture experience needs to instruct the user to tilt the device forward a bit.
Default configuration:
CaptureMessage getTiltUpDeviceMessage | ( | ) |
Returns the attributes of the message that will be displayed when the capture experience needs to instruct the user to tilt the device up a bit.
Default configuration:
CaptureMessage getTutorialDismissMessage | ( | ) |
A property to configure the attributes of the instruction message that is displayed when the capture experience needs to instruct the user to skip tutorial demo.
The following CaptureMessage property methods are not supported for this message: getMessageIcons() / setMessageIcons(Bitmap[]).
Default configuration:
CaptureMessage getUserInstructionMessage | ( | ) |
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 property methods are not supported for this message: getMessageIcons() / setMessageIcons(Bitmap[]).
Default configuration:
Reimplemented in CheckCaptureExperience, and PassportCaptureExperience.
CaptureMessage getZoomInMessage | ( | ) |
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:
CaptureMessage getZoomOutMessage | ( | ) |
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:
|
protected |
boolean isAnimationTutorEnable | ( | ) |
boolean isDiagnosticsViewEnabled | ( | ) |
boolean isVibrationEnabled | ( | ) |
Reimplemented from CaptureExperience.
final void removeAboutToCaptureListener | ( | AboutToCaptureListener | listener | ) |
Remove AboutToCaptureListener.
listener | The image about to capture listener |
final void removeJustCapturedListener | ( | JustCapturedListener | listener | ) |
Remove justCapturedListener.
listener | The image just captured listener |
final void removeOnImageCapturedEventListener | ( | ImageCapturedEventListener | listener | ) |
Remove Image Captured Event Listener
listener | Image Captured Event Listener |
final void removeOnImageCapturedListener | ( | ImageCapturedListener | listener | ) |
Remove ImageCapturedListener.
listener | The image captured listener |
Reimplemented from CaptureExperience.
void removePageDetectionListener | ( | PageDetectionListener | listener | ) |
Removes page detection listener.
listener | the listener |
void setCapturedMessage | ( | CaptureMessage | capturedMessage | ) |
This message will be displayed when the document is captured.
capturedMessage | : CaptureMessage |
void setCenterMessage | ( | CaptureMessage | centerMessage | ) |
This instruction will be displayed when the document is not centered enough in the target frame for capture.
centerMessage | : CaptureMessage |
Reimplemented in FixedAspectRatioCaptureExperience, CheckCaptureExperience, and PassportCaptureExperience.
final void setDiagnosticsViewEnabled | ( | boolean | enabled | ) |
Enables diagnostics view. Following information is logging:
By default, the diagnostics view isn't shown.
enabled | Whether to show diagnostics view or not |
void setDocumentSampleImage | ( | Bitmap | documentSampleImage | ) |
The specified Bitmap of a sample document is displayed over the document frame area when the animated tutorial is enabled. The sample document image is stretched if necessary to fill the entire document frame area. While the tutorial is running, MICR and guidance animation are superimposed over the image.
A default document sample image is used if it isn't set by the app. Inherited classes have own default sample images.
documentSampleImage | : Bitmap |
void setGuidanceFrameColor | ( | int | colorCode | ) |
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 setGuidanceFrameThickness | ( | int | width | ) |
Guidance frame Thickness.
Specifies the thickness of the guidance frame line in Denisty-indepenent Pixels(dp). Valid values are in the range [0, 100], values outside this range will be ignored and default width will be set. The default value is 12 dp.
void setHoldParallelMessage | ( | CaptureMessage | message | ) |
This message will be displayed when the capture experience needs to instruct the user to hold the device more level.
message | CaptureMessage |
void setHoldSteadyMessage | ( | CaptureMessage | holdSteadyMessage | ) |
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.
holdSteadyMessage | : CaptureMessage |
void setOuterViewFinderColor | ( | int | colorCode | ) |
Outer view finder color.
Specifies the color that will be used for the outer view finder background. The default color is translucent grey.
void setRotateMessage | ( | CaptureMessage | message | ) |
This message will be displayed when the capture experience needs to instruct the user to rotate the device or the document.
message | CaptureMessage |
Reimplemented in FixedAspectRatioCaptureExperience.
void setSteadyGuidanceFrameColor | ( | int | colorCode | ) |
Steady guidance frame color.
Specifies the color that will be used for the guidance frame when control is ready to capture.
By default, it is equals to the guidanceFrameColor (green).
void setTiltForwardDeviceMessage | ( | CaptureMessage | message | ) |
This message will be displayed when the capture experience needs to instruct the user to tilt the device forward a bit.
message | CaptureMessage |
void setTiltUpDeviceMessage | ( | CaptureMessage | message | ) |
This message will be displayed when the capture experience needs to instruct the user to tilt the device up a bit.
message | CaptureMessage |
void setTutorialDismissMessage | ( | CaptureMessage | tutorialDismissMessage | ) |
A property to configure the attributes of the instruction message that is displayed when the capture experience needs to instruct the user to skip tutorial demo.
tutorialDismissMessage | : CaptureMessage |
void setUserInstructionMessage | ( | CaptureMessage | userInstructionsMessage | ) |
A property to configure the attributes of the instruction message that is displayed on the capture control while the user is trying to capture.
userInstructionsMessage | : CaptureMessage |
Reimplemented in CheckCaptureExperience, and PassportCaptureExperience.
final void setVibrationEnabled | ( | boolean | enable | ) |
Manage vibration after an image is captured.
Turn on/off vibration after an image is captured for haptic feedback.
Enabled by default.
enable | boolean |
Reimplemented from CaptureExperience.
void setZoomInMessage | ( | CaptureMessage | zoomInMessage | ) |
This message will be displayed when the capture experience needs to instruct the user to move the device closer to the target document.
zoomInMessage | : CaptureMessage |
Reimplemented in FixedAspectRatioCaptureExperience.
void setZoomOutMessage | ( | CaptureMessage | zoomOutMessage | ) |
This message will be displayed when the capture experience needs to instruct the user to move the device farther away from the target document.
zoomOutMessage | : CaptureMessage |
Reimplemented in FixedAspectRatioCaptureExperience.
void stopCapture | ( | ) |
This is the counterpart to takePicture() and takePictureContinually(). Calling this method will stop automatic image capture when the criteria are satisfied.
Reimplemented from CaptureExperience.
void takePicture | ( | ) |
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.
Reimplemented from CaptureExperience.
void takePictureContinually | ( | ) |
Calling this method will start the continuous capture of images. Images will automatically be captured when criteria are satisfied.
Reimplemented from CaptureExperience.
|
protected |