Kofax Mobile SDK API Reference
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SelfieBaseCaptureExperience Class Reference
Inheritance diagram for SelfieBaseCaptureExperience:
SelfieCaptureExperience

Public Member Functions

 SelfieBaseCaptureExperience (ImageCaptureView view, SelfieCaptureExperienceCriteriaHolder criteria)
 
SelfieCaptureExperienceCriteriaHolder getCaptureCriteria ()
 
void setVibrationEnabled (boolean enable)
 
boolean isVibrationEnabled ()
 
CaptureMessage getUserInstructionMessage ()
 
CaptureMessage getBlinkMessage ()
 
CaptureMessage getHoldSteadyMessage ()
 
CaptureMessage getCapturedMessage ()
 
void setUserInstructionMessage (CaptureMessage userInstructionMessage)
 
void setBlinkMessage (CaptureMessage blinkMessage)
 
void setHoldSteadyMessage (CaptureMessage holdSteadyMessage)
 
void setCapturedMessage (CaptureMessage capturedMessage)
 
void takePicture ()
 
void stopCapture ()
 
void setOuterViewFinderColor (int colorCode)
 
int getOuterViewFinderColor ()
 
void setFrameColor (int colorCode)
 
int getFrameColor ()
 
double getPaddingPercent ()
 
final void addOnImageCapturedListener (ImageCapturedListener listener)
 
final void removeOnImageCapturedListener (ImageCapturedListener listener)
 
void destroy ()
 

Protected Member Functions

void initBase (ImageCaptureView view, SelfieCaptureExperienceCriteriaHolder criteria)
 

Protected Attributes

Context _ctx
 

Detailed Description

This class renders an enhanced visual experience on an ImageCaptureView and provides feedback to guide the user to take a clear, legible photo of a selfie. Criteria can be specified by using a setCaptureCriteria method.

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

Constructor & Destructor Documentation

Note: This is best used on a view that occupies the 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.

Member Function Documentation

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.

Parameters
listenerThe image captured listener
See also
ImageCapturedListener
void destroy ( )

Detaches from the ImageCaptureView and destroys this experience.

CaptureMessage getBlinkMessage ( )

Returns the attributes of the instruction message that is displayed to guide the user to blink his eyes after the face aligned properly in the target frame This will be displayed after the user aligned his face properly in the target frame.

Default configuration:

  • message: "Blink now"
  • text color: white
  • background color: black with 0.7 alpha component
  • background drawable: not specified
  • text size: 20
  • typeface: not specified
  • messageIcons: not specified
  • orientation: CaptureMessage.KUIMessageOrientation#PORTRAIT
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage
See also
setBlinkMessage(CaptureMessage)
CaptureMessage
SelfieCaptureExperienceCriteriaHolder getCaptureCriteria ( )

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

Returns
SelfieCaptureExperienceCriteriaHolder
See also
SelfieCaptureExperienceCriteriaHolder
CaptureMessage getCapturedMessage ( )

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

Default configuration:

  • message: "Done!"
  • text color: green
  • background color: black with 0.7 alpha component
  • background drawable: not specified
  • text size: 20
  • 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
int getFrameColor ( )

Returns the target frame border color.

Returns
the target frame color
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: White
  • background color: black with 0.7 alpha component
  • background drawable: not specified
  • text size: 20
  • typeface: not specified
  • messageIcons: not specified
  • orientation: CaptureMessage.KUIMessageOrientation#PORTRAIT
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage
See also
setHoldSteadyMessage(CaptureMessage)
CaptureMessage
int getOuterViewFinderColor ( )

Returns the target frame outer view color.

Returns
the target frame outer view color.
double getPaddingPercent ( )

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

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 to instruct the user to fit his face in the frame. This may happen in particular when the user is holding a device too far away from the face or when the face is out of the target frame.

Default configuration:

  • message: "Center Face"
  • text color: white
  • background color: black with 0.7 alpha component
  • background drawable: not specified
  • text size: 20
  • typeface: not specified
  • messageIcons: not specified
  • orientation: CaptureMessage.KUIMessageOrientation#PORTRAIT
  • width and height: not specified
  • position: center
  • visibility: true
Returns
CaptureMessage
See also
setUserInstructionMessage(CaptureMessage)
CaptureMessage
void initBase ( ImageCaptureView  view,
SelfieCaptureExperienceCriteriaHolder  criteria 
)
protected
boolean isVibrationEnabled ( )
Returns
Whether vibration availability during capturing
final void removeOnImageCapturedListener ( ImageCapturedListener  listener)

Remove ImageCapturedListener.

Parameters
listenerThe image captured listener
See also
ImageCapturedListener
addOnImageCapturedListener(ImageCapturedListener)
void setBlinkMessage ( CaptureMessage  blinkMessage)

A property to configure the attributes of the instruction message that is displayed to blink his eyes after the user properly aligned his face in the target frame.

Parameters
blinkMessage: CaptureMessage
See also
getUserInstructionMessage()
CaptureMessage
void setCapturedMessage ( CaptureMessage  capturedMessage)

This message will be displayed when the selfie is captured.

Parameters
capturedMessage: CaptureMessage
See also
getCapturedMessage()
CaptureMessage
void setFrameColor ( int  colorCode)

The target frame border color can be set here.

Parameters
colorCodeThe target frame border color.
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.

Parameters
holdSteadyMessage: CaptureMessage
See also
getHoldSteadyMessage()
CaptureMessage
void setOuterViewFinderColor ( int  colorCode)

The target frame outer view color can be set here.

Parameters
colorCodethe target frame outer view color.
void setUserInstructionMessage ( CaptureMessage  userInstructionMessage)

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
userInstructionMessage: CaptureMessage
See also
getUserInstructionMessage()
CaptureMessage
void setVibrationEnabled ( boolean  enable)

Method to manage vibration availability during capturing.

Parameters
enableWhether to vibrate during capture
void stopCapture ( )

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

See also
takePicture()
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.

Member Data Documentation

Context _ctx
protected

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.