new DocumentCaptureExperience()
Methods
addImageAboutToCaptureListener(successCallback, errorCallback, imageAboutToCaptureCallback)
A listener that will be called when an image is about to capture. This will only be sent after the experience receives a takePicture message.
The experience will wait until the desired stability, levelness, and camera adjustments are met and then capture an image.
Add this event listener before calling the 'takePicture' method.
Parameters:
Name |
Type |
Description |
successCallback |
function
|
Default Success Call back function name |
errorCallback |
function
|
Default Error Call back function name |
imageAboutToCaptureCallback |
function
|
Call back for event |
- See:
-
- Check the 'errorCallback' method for any failures in case of unexpected behaviour of the method. By Default, the error call back
would return a JSON object giving ErrMsg & ErrDesc giving the description of the error.
Returns:
The return value is captured in the 'successCallback' function for successful operation.
The 'imageAboutToCaptureCallback' will have return value in this callback
Example
function imageAboutToCaptureCallback(response)
{
alert(JSON.stringify(response));
}
function successCallback(response){
alert(JSON.stringify(response));
}
function errorCallback(error){
alert(JSON.stringify(error));
}
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
documentCaptureExperience.addImageAboutToCaptureListener(successCallback, errorCallback, imageAboutToCaptureCallback);
addImageCapturedListener(successCallback, errorCallback, imageCaptureCallback)
A listener that will be called when an image was captured. This will only be sent after the experience receives a takePicture message.
The experience will wait until the desired stability, levelness, and camera adjustments are met and then capture an image. It would then send the
imageObject of the captured image to success call back method.
Add this event listener before calling the 'takePicture' method.
Parameters:
Name |
Type |
Description |
successCallback |
function
|
Default Success Call back function name |
errorCallback |
function
|
Default Error Call back function name |
imageCaptureCallback |
function
|
A JSON object containing the properties of the captured image object. Check the 'Image' object for its properties. |
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - success string indicating the method has been invoked
errorCallback - error in case any error occurs
Example
function imageCaptureCallback(image){
alert(image.imageid);
}
function successCallback(response){
alert(JSON.stringify(response));
}
function errorCallback(error){
alert(JSON.stringify(error));
}
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
documentCaptureExperience.addImageCapturedListener(successCallback, errorCallback, imageCaptureCallback);
addImageJustCapturedListener(successCallback, errorCallback, imageJustCapturedCallback)
A listener that will be called when an image is captured and just before done message is shown. This will only be sent after the experience receives a takePicture message.
The experience will wait until the desired stability, levelness, and camera adjustments are met and then capture an image. It would then send the
imageObject of the captured image to success call back method.
Add this event listener before calling the 'takePicture' method.
Parameters:
Name |
Type |
Description |
successCallback |
function
|
Default Success Call back function name |
errorCallback |
function
|
Default Error Call back function name |
imageJustCapturedCallback |
function
|
A JSON object containing the properties of the captured image object. Check the 'Image' object for its properties. |
- See:
-
- Check the 'errorCallback' method for any failures in case of unexpected behaviour of the method. By Default, the error call back
would return a JSON object giving ErrMsg & ErrDesc giving the description of the error.
Returns:
The return value is captured in the 'successCallback' function for successful operation.
The 'imageJustCapturedCallback' will have the JSON object of the captured KfxKEDImage properties. The captured KEDImage is stored in ImageArray.
The image can be retrieved using methods on ImageArray.
Example
function imageJustCapturedCallback(imageObject)
{
alert(JSON.stringify(imageObject));
}
function successCallback(response){
alert(JSON.stringify(response));
}
function errorCallback(error){
alert(JSON.stringify(error));
}
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
documentCaptureExperience.addImageJustCapturedListener(successCallback, errorCallback, imageJustCapturedCallback);
bindCaptureControl(successCallback:, errorCallback:, imageCaptureControlID)
Method to bind the created ImageCapture Control with the DocumentCaptureExperience class .
Parameters:
Name |
Type |
Description |
successCallback: |
function
|
Default Success call back function name |
errorCallback: |
function
|
Default Error call back function name |
imageCaptureControlID |
String
|
: Pass the ID retrieved for the Image Capture Control If a wrong ID is passed an error is received in the error callback |
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - success string indicating the method has been invoked
errorCallback - error in case any error occurs
Example
var imageCaptureControl = kfxCordova.kfxUicontrols.createImageCaptureControl();
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
var imageCaptureControlID = null;
imageCaptureControl.getId(function(captureControlID){
imageCaptureControlID = captureControlID;
},function(error){
alert(JSON.stringify(error));
});
documentCaptureExperience.bindCaptureControl(function(success){alert(JSON.stringify(success));},function(error){alert(JSON.stringify(error));},imageCaptureControlID);
bindCaptureControlWithOptions(successCallback:, errorCallback:, options)
Method to bind the created ImageCapture Control with the DocumentCaptureExperience class and also to set options. This method is a combination of bindCaptureControl API and setOptions API.
Parameters:
Name |
Type |
Description |
successCallback: |
function
|
Default Success call back function name |
errorCallback: |
function
|
Default Error call back function name |
options |
Object
|
: A JSON object containing the ID retrieved for the Image Capture Control and the properties to be set to the DocumentCaptureExperience. If a wrong ID is passed an error is received in the error callback
Properties
Name |
Type |
Attributes |
Description |
ImageCaptureControlID |
String
|
<optional>
|
: Pass the ID retrieved for the Image Capture Control. If a wrong ID is passed an error is received in the error callback |
CaptureExperienceOptions |
Object
|
<optional>
|
: a 'documentCaptureExperienceOptions' variable containing the properties to be set to the DocumentCaptureExperience |
|
- See:
-
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - success string indicating the method has been invoked
errorCallback - error in case any error occurs
Example
var imageCaptureControl = kfxCordova.kfxUicontrols.createImageCaptureControl();
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
var imageCaptureControlID = null;
var documentCaptureExperienceOptions = null;
documentCaptureExperience.getOptions(function(success){documentCaptureExperienceOptions = success},function(error){alert(JSON.stringify(error));});
imageCaptureControl.getId(function(captureControlID){
imageCaptureControlID = captureControlID;
},function(error){
alert(JSON.stringify(error));
});
documentCaptureExperience.bindCaptureControlWithOptions(function(success){alert(JSON.stringify(success));},function(error){alert(JSON.stringify(error));},{"ImageCaptureControlID":imageCaptureControlId,"CaptureExperienceOptions":documentCaptureExperienceOptions});
destroy(successCallback, errorCallback)
Method to clear DocumentCaptureExperience memory.
Parameters:
Name |
Type |
Description |
successCallback |
function
|
Default Success call back function name |
errorCallback |
function
|
Default Error call back function name |
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - success string indicating the method has been invoked
errorCallback - error in case any error occurs
Example
function errorCallback(error){
alert(JSON.stringify(error));
}
function successCallback(options){
alert(JSON.stringify(options));
// Optionally you can get the properties and map to the application UI to show the user
}
var imageCaptureControl = kfxCordova.kfxUicontrols.createImageCaptureControl();
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
var imageCaptureControlID = null;
imageCaptureControl.getId(function(captureControlID){
imageCaptureControlID = captureControlID;
},function(error){
alert(JSON.stringify(error));
});
documentCaptureExperience.bindCaptureControl(function(success){alert(JSON.stringify(success));},function(error){alert(JSON.stringify(error));},imageCaptureControlID);
documentCaptureExperience.takePictureContinually(successCallback,errorCallback);
documentCaptureExperience.destroy(successCallback,errorCallback);
getDocumentCaptureOptions()
Method returning the 'DocumentCaptureExperience' class properties that can be set by the user. Use this object as an input
parameter to set the properties of the DocumentCaptureExperience class. The parameters are grouped, and has the below mentioned
default values.
Example
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
var documentCaptureExperienceProperties = documentCaptureExperience.getDocumentCaptureOptions();
documentCaptureExperienceProperties should be like below{
LookAndFeel: {
enableAnimationTutor: false,
outerViewFinderColor : "#B2000000",
vibrationEnabled : true,
diagnosticsViewEnabled : false,
guidanceFrameThickness : 8,
tutorialSampleImagePath : '',
guidanceFrameColor : "#00FF00"
},
CaptureCriteria: {
stabilityThresholdEnabled: true,
stabilityThreshold: 95,
focusEnabled: true,
rollThresholdEnabled: true,
rollThreshold: 15,
pitchThreshold: 15,
pitchThresholdEnabled: true,
DocumentDetectionSettings:{
shortEdgeThreshold: 85,
longEdgeThreshold: 85,
edgeDetection: "GPUBased",
DetectionSettings:{
centerPoint:{
x: 0,
y: 0
},
aspectRatio: 0,
padding: 10.0,
minFillFraction: 0.2,
maxFillFraction: 1.5,
maxSkewAngle: 10.0,
toleranceFraction: 0.15
}
}
},
UserInstructionMessage: {
backgroundColor: "#00000000",
textColor: "#FFFFFFFF",
message: "Fill viewable area with document",
visible: true,
orientation: "LANDSCAPE",
fontAndroid: {
textSize : -1
},
fontiOS:{
fontSize : -1,
fontName : "HelveticaNeue"
},
position :{
x : -1,
y : -1
},
size:{
width: -1,
height: -1
}
},
HoldSteadyMessage: {
backgroundColor: "#B2000000",
textColor: "#FFFF0000",
message: "Hold Steady",
visible: true,
orientation: "LANDSCAPE",
fontAndroid: {
textSize : -1
},
fontiOS:{
fontSize : -1,
fontName : "HelveticaNeue"
},
position :{
x : -1,
y : -1
},
size:{
width: -1,
height: -1
}
},
CapturedMessage: {
backgroundColor: "#B2000000",
textColor: "#00F900",
message: "Done!",
visible: true,
orientation: "LANDSCAPE",
fontAndroid: {
textSize : -1
},
fontiOS:{
fontSize : -1,
fontName : "HelveticaNeue"
},
position :{
x : -1,
y : -1
},
size:{
width: -1,
height: -1
}
},
CenterMessage: {
backgroundColor: "#B2000000",
textColor: "#FFFFFFFF",
message: "Center Document",
visible: true,
orientation: "LANDSCAPE",
fontAndroid: {
textSize : -1
},
fontiOS:{
fontSize : -1,
fontName : "HelveticaNeue"
},
position :{
x : -1,
y : -1
},
size:{
width: -1,
height: -1
}
},
ZoomInMessage: {
backgroundColor: "#B2000000",
textColor: "#FFFFFFFF",
message: "Move Closer",
visible: true,
orientation: "LANDSCAPE",
fontAndroid: {
textSize : -1
},
fontiOS:{
fontSize : -1,
fontName : "HelveticaNeue"
},
position :{
x : -1,
y : -1
},
size:{
width: -1,
height: -1
}
},
ZoomOutMessage: {
backgroundColor: "#B2000000",
textColor: "#FFFFFFFF",
message: "Move Back",
visible: true,
orientation: "LANDSCAPE",
fontAndroid: {
textSize : -1
},
fontiOS:{
fontSize : -1,
fontName : "HelveticaNeue"
},
position :{
x : -1,
y : -1
},
size:{
width: -1,
height: -1
}
},
RotateMessage: {
backgroundColor: "#B2000000",
textColor: "#FFFFFFFF",
message: "Rotate Device",
visible: true,
orientation: "LANDSCAPE",
fontAndroid: {
textSize : -1
},
fontiOS:{
fontSize : -1,
fontName : "HelveticaNeue"
},
position :{
x : -1,
y : -1
},
size:{
width: -1,
height: -1
}
},
HoldParallelMessage: {
backgroundColor: "#B2000000",
textColor: "#FFFFFFFF",
message: "Hold Device Level",
visible: true,
orientation: "LANDSCAPE",
fontAndroid: {
textSize : -1
},
fontiOS:{
fontSize : -1,
fontName : "HelveticaNeue"
},
position :{
x : -1,
y : -1
},
size:{
width: -1,
height: -1
}
},
TutorialDismissMessage: {
backgroundColor: "#B2000000",
textColor: "#FFFFFFFF",
message: "Tap to dismiss",
visible: true,
orientation: "LANDSCAPE",
fontAndroid: {
textSize : -1
},
fontiOS:{
fontSize : -1,
fontName : "HelveticaNeue"
},
position :{
x : -1,
y : -1
},
size:{
width: -1,
height: -1
}
}
};
getOptions(successCallback, errorCallback)
Method to get the properties of the native DocumentCaptureExperience class.
Parameters:
Name |
Type |
Description |
successCallback |
function
|
Default Success call back function name |
errorCallback |
function
|
Default Error call back function name |
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - success string indicating the method has been invoked
errorCallback - error in case any error occurs
Example
function errorCallback(error){
alert(JSON.stringify(error));
}
function successCallback(options){
alert(JSON.stringify(options));
// Optionally you can get the properties and map to the application UI to show the user
}
var imageCaptureControl = kfxCordova.kfxUicontrols.createImageCaptureControl();
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
var imageCaptureControlID = null;
imageCaptureControl.getId(function(captureControlID){
imageCaptureControlID = captureControlID;
},function(error){
alert(JSON.stringify(error));
});
documentCaptureExperience.bindCaptureControl(function(success){alert(JSON.stringify(success));},function(error){alert(JSON.stringify(error));},imageCaptureControlID);
documentCaptureExperience.getOptions(successCallback,errorCallback);
removeImageAboutToCaptureListener(successCallback, errorCallback)
The method would remove the listener to the delegate call back of the takePicture method.
Parameters:
Name |
Type |
Description |
successCallback |
function
|
Default Success Call back function name |
errorCallback |
function
|
Default Error Call back function name |
- See:
-
- Check the 'errorCallback' method for any failures in case of unexpected behaviour of the method. Generally the error call back
would return a JSON object with 'ErrorMs' & 'ErrorDesc' giving the description of the error.
Returns:
The return value is captured in the 'successCallback' function for successful operation.
Example
function successCallback(response){
alert(JSON.stringify(response));
}
function errorCallback(error){
alert(JSON.stringify(error));
}
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
// after taking picture
documentCaptureExperience.removeImageAboutToCaptureListener(successCallback,errorCallback);
removeImageCapturedListener(successCallback, errorCallback)
The method would remove the listener to the delegate call back of the takePicture method.
Parameters:
Name |
Type |
Description |
successCallback |
function
|
Default Success Call back function name |
errorCallback |
function
|
Default Error Call back function name |
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - success string indicating the method has been invoked
errorCallback - error in case any error occurs
Example
function successCallback(response){
alert(JSON.stringify(response));
}
function errorCallback(error){
alert(JSON.stringify(error));
}
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
//after taking picture
documentCaptureExperience.removeImageCapturedListener(successCallback,errorCallback);
removeImageJustCapturedListener(successCallback, errorCallback)
The method would remove the listener to the delegate call back of the takePicture method.
Parameters:
Name |
Type |
Description |
successCallback |
function
|
Default Success Call back function name |
errorCallback |
function
|
Default Error Call back function name |
- See:
-
- Check the 'errorCallback' method for any failures in case of unexpected behaviour of the method. Generally the error call back
would return a JSON object with 'ErrorMs' & 'ErrorDesc' giving the description of the error.
Returns:
The return value is captured in the 'successCallback' function for successful operation.
Example
function successCallback(response){
alert(JSON.stringify(response));
}
function errorCallback(error){
alert(JSON.stringify(error));
}
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
// after taking picture
documentCaptureExperience.removeImageJustCapturedListener(successCallback,errorCallback);
setOptions(successCallback, errorCallback, options)
Method to set the properties of the native DocumentCaptureExperience class.
Parameters:
Name |
Type |
Description |
successCallback |
function
|
Default Success call back function name |
errorCallback |
function
|
Default Error call back function name |
options |
Object
|
a 'documentCaptureExperienceOptions' variable containing the properties to be set to the DocumentCaptureExperience
Properties
Name |
Type |
Attributes |
Description |
LookAndFeel |
Object
|
|
Look and Feel options
Properties
Name |
Type |
Attributes |
Default |
Description |
outerViewFinderColor |
String
|
<optional>
|
"#B2000000"
|
This value specifies the outer view finder color |
enableAnimationTutor |
Boolean
|
<optional>
|
false
|
This value specifies the animation tutor is enable or not. If user faces any difficulty while capturing a document then he need to enable the animation tutor. |
diagnosticsViewEnabled |
Boolean
|
<optional>
|
false
|
This value specifies to turn ON/OFF diagnostic information view |
vibrationEnabled |
Boolean
|
<optional>
|
true
|
This value specifies the device vibration is enable or not when image capture happens |
guidanceFrameThickness |
Number
|
<optional>
|
8
|
This value specifies the thickness that will be used for the guidance frame. Valid values are in the range [1, 100]. Values outside this range will be interpreted as 8.
The default thickness is 8. |
tutorialSampleImagePath |
String
|
<optional>
|
''
|
This value specifies the tutorial image path to display custom tutorial image, this path should be relative to www root folder of the application. It is set only property and getOptions will always return this property with empty value.
The images cannot be of very high resolution and size.The sample image is stretched if necessary to fill the entire frame area. |
guidanceFrameColor |
Boolean
|
<optional>
|
"#00FF00"
|
This value specifies the color that will be used for the guidance frame. |
|
CaptureCriteria |
Object
|
|
capture criteria options
Properties
Name |
Type |
Attributes |
Default |
Description |
stabilityThresholdEnabled |
Boolean
|
<optional>
|
true
|
Whether the stability threshold is enabled.
A boolean that indicates whether the stability threshold is enabled.If enabled this criteria is checked before taking a picture. |
pitchThresholdEnabled |
Boolean
|
<optional>
|
true
|
Whether the Pitch threshold is enabled.
A boolean that indicates whether the Pitch threshold is enabled. If enabled this criteria is checked before taking a picture. |
rollThresholdEnabled |
Boolean
|
<optional>
|
true
|
Whether the Roll threshold is enabled.
A boolean that indicates whether the Roll threshold is enabled. If enabled this criteria is checked before taking a picture. |
focusEnabled |
Boolean
|
<optional>
|
true
|
Whether the Focus constraint is enabled.
A boolean that indicates whether the Focus constraint is enabled. If enabled this criteria is checked before taking a picture.
Making it enabled is advisable. Otherwise it is highly likely that images out of focus are captured. Default value is enabled. |
stabilityThreshold |
Number
|
<optional>
|
95
|
The stability threshold value
Stability Value which needs to be met before taking a picture. It is a number from 0 to 100, where 100 indicates that the device must be near perfectly still to take a picture and 0 indicates that stability checking is turned off.
Default value is 95 |
pitchThreshold |
Number
|
<optional>
|
15
|
The Pitch threshold value
Pitch Value which needs to be met before taking a picture.
The default value is 15.
Valid values are in the range [0, 45]. Values outside this range will be interpreted as 0 or 45. A value
of 45 disables level checking for pitch. |
rollThreshold |
Number
|
<optional>
|
15
|
The Roll threshold value
Roll Value which needs to be met before taking a picture. The default value is 15.
Valid values are in the range [0, 45]. Values outside this range will be interpreted as 0 or 45. A value
of 45 disables level checking for roll. |
|
DocumentDetectionSettings |
Object
|
<optional>
|
document detection settings
Properties
Name |
Type |
Attributes |
Default |
Description |
shortEdgeThreshold |
Number
|
<optional>
|
85
|
short edge threshold value used to detect the document. The valid range is [0 - 100]. |
longEdgeThreshold |
Number
|
<optional>
|
85
|
long edge threshold value used to detect the document. The valid range is [0 - 100]. |
edgeDetection |
String
|
<optional>
|
"GPUBased"
|
A property to get or set the document edge detection algorithm, with two values: ISG and GPUBased. |
DetectionSettings |
Object
|
<optional>
|
|
detection settings
Properties
Name |
Type |
Attributes |
Default |
Description |
centerPoint |
Object
|
<optional>
|
|
center point of the document. Should just be a point with in the bounds of the image height and width.
Properties
Name |
Type |
Attributes |
Description |
x |
Number
|
<optional>
|
x value of the center. Should just be with in the bounds of the image of the target frame. |
y |
Number
|
<optional>
|
y value of the center. Should just be with in the bounds of the image of the target frame. |
|
aspectRatio |
Number
|
<optional>
|
0
|
aspect ratio of the document. Aspect ratio between 0 and 1 or negative is not recommended. It can result in erroneous detection of target frame. The aspect ratio is presented in the format of longEdge/shortEdge, and is used to construct the largest target frame. If the targetFrameAspectRatio is set to 0, then it will be automatically reset to an image aspect ratio. |
padding |
Number
|
<optional>
|
5
|
padding percent value. Values will be clamped to the range [0-50]. The default value is 5. |
minFillFraction |
Number
|
<optional>
|
0.65
|
minimum fill fraction value. Setting a negative number is ignored. |
maxFillFraction |
Number
|
<optional>
|
1.3
|
maximum fill fraction value. Setting a negative number is ignored. |
maxSkewAngle |
Number
|
<optional>
|
10
|
maximum skew angle value. The default value is 10, specified in degrees. Setting a negative number is ignored. |
toleranceFraction |
Number
|
<optional>
|
0.15
|
tolerance fraction value. Setting a negative number is ignored. |
|
|
CapturedMessage |
Object
|
|
captured indication message options
Properties
Name |
Type |
Attributes |
Default |
Description |
message |
String
|
<optional>
|
"Done!"
|
The text of the message
Specifies the text of the message.
The default message is the empty string. You must set a message for anything to be displayed. |
textColor |
String
|
<optional>
|
"#FFFFFFFF"
|
The color used to display the text
Specifies the color that the message's text will be rendered with.
The default color is white. |
backgroundColor |
String
|
<optional>
|
"#00FFFFFFF"
|
The color used to display the background of the message
Specifies the color that the message's background are will be rendered with. The full area specified by the size property will be filled with the background color, excluding areas clipped outside of view bounds.
The default background color is transparent. |
visible |
Boolean
|
<optional>
|
True
|
The visibility of the message
Specifies whether the message is visible or not. A value of "false" will prevent the message from appearing. A value of "true" will show the message, if there is nothing else to prevent it from appearing.
The default value is true. Some objects that use messages, like the capture experience objects, will automatically manage and update this state. |
orientation |
String
|
<optional>
|
"LANDSCAPE"
|
The orientation of the message
Use one of the allowed values to set the orientation of the messages being displayed. Once a orientation is set, message stays in that orientation even if the device rotates.In other words this is sticky.
If you want to handle the rotation when device rotates, orientation has to be explicitly set again on the message.
The default value is LANDSCAPE. Allowable values are PORTRAIT, LANDSCAPE, REVERSEPORTRAIT, REVERSELANDSCAPE
If you modify the orientation of the message, plugin (underlying SDK) tries to optimally display the message however it may not always get displayed with appropriate size and font. It is recommended to set the size or font appropriately if needed. |
fontAndroid |
Object
|
|
|
The font used to display the text of the message on Android platform.
Properties
Name |
Type |
Attributes |
Description |
textSize |
Number
|
<optional>
|
The text font size of the message
The default is -1, which causes the message text font size to be determined as the SDK sees fit. |
|
fontiOS |
Object
|
|
|
The font used to display the text of the message on iOS platform.
Properties
Name |
Type |
Attributes |
Description |
fontSize |
Number
|
<optional>
|
fontSize the size of the text in the message
fontSize by default is -1 which means an optimal size is calculated and displayed.
fontSize generally accepts positive numbers.
Setting arbitrarily large values to fontSize may not render the font and behavior is not defined. |
fontName |
String
|
<optional>
|
fontName is the name of the font to be used for the message
fontName by default is "HelveticalNeue"
fontName complies to the iOS font family names (refer to iOS SDK native documentation to know about supported font families). |
|
position |
Object
|
|
|
The position (center) of the text message. Applicable only on iOS platform. This will not have any impact on Android platform.
The message object will be overlay on top of an Image Capture Control with the center of the message being located at this coordinate.
Changes in the size of the capture control will usually require updating the position of the message as well.
position by default is "auto" position and is set appropriately which is suitable to the parent view.
once a new value for position is set (other than default) the "auto" quality is lost and the new value is used. If the value is changed it cannot be reset to default in the current instance. The object has to be recreated and set (typically an experience object has to be recreated).
position complies to the co-ordinate system in iOS. Setting arbitrarily large values is not recommended and behavior is not defined.
Properties
Name |
Type |
Attributes |
Description |
x |
Number
|
<optional>
|
x co-ordinate of the position |
y |
Number
|
<optional>
|
y co-ordinate of the position |
|
size |
Object
|
|
|
The Size of the text message. Applicable for iOS and Android.
The message object will be rendered with dimensions specified by this property. Text will be contained within this boundary, and any set background color will completely cover this area.
The default size has width -1 and height -1 which means an appropriate size is calculated and rendered.
If the value is changed it cannot be reset to default in the current instance.
In Android, rendering might differ based on device being used.
If the value is changed it cannot be reset to default in the current instance. The object on which this is applied has to be recreated and set (typically an experience object has to be recreated).
Whenever the orientation of the message has been changed, the size may have to be updated.
Properties
Name |
Type |
Attributes |
Description |
width |
Number
|
<optional>
|
width of the message |
height |
Number
|
<optional>
|
height of the message |
|
|
HoldSteadyMessage |
Object
|
|
hold steady message options
Properties
Name |
Type |
Attributes |
Default |
Description |
message |
String
|
<optional>
|
"Hold Steady"
|
The text of the message
Specifies the text of the message.
The default message is the empty string. You must set a message for anything to be displayed. |
textColor |
String
|
<optional>
|
"#FFFFFFFF"
|
The color used to display the text
Specifies the color that the message's text will be rendered with.
The default color is white. |
backgroundColor |
String
|
<optional>
|
"#00FFFFFFF"
|
The color used to display the background of the message
Specifies the color that the message's background are will be rendered with. The full area specified by the size property will be filled with the background color, excluding areas clipped outside of view bounds.
The default background color is transparent. |
visible |
Boolean
|
<optional>
|
true
|
The visibility of the message
Specifies whether the message is visible or not. A value of "false" will prevent the message from appearing. A value of "true" will show the message, if there is nothing else to prevent it from appearing.
The default value is true. Some objects that use messages, like the capture experience objects, will automatically manage and update this state. |
orientation |
String
|
<optional>
|
"LANDSCAPE"
|
The orientation of the message
Use one of the allowed values to set the orientation of the messages being displayed. Once a orientation is set, message stays in that orientation even if the device rotates.In other words this is sticky.
If you want to handle the rotation when device rotates, orientation has to be explicitly set again on the message.
The default value is LANDSCAPE. Allowable values are PORTRAIT, LANDSCAPE, REVERSEPORTRAIT, REVERSELANDSCAPE
If you modify the orientation of the message, plugin (underlying SDK) tries to optimally display the message however it may not always get displayed with appropriate size and font. It is recommended to set the size or font appropriately if needed. |
fontAndroid |
Object
|
|
|
The font used to display the text of the message on Android platform.
Properties
Name |
Type |
Attributes |
Description |
textSize |
Number
|
<optional>
|
The text font size of the message
The default is -1, which causes the message text font size to be determined as the SDK sees fit. |
|
fontiOS |
Object
|
|
|
The font used to display the text of the message on iOS platform.
Properties
Name |
Type |
Attributes |
Description |
fontSize |
Number
|
<optional>
|
fontSize the size of the text in the message
fontSize by default is -1 which means an optimal size is calculated and displayed.
fontSize generally accepts positive numbers.
Setting arbitrarily large values to fontSize may not render the font and behavior is not defined. |
fontName |
String
|
<optional>
|
fontName is the name of the font to be used for the message
fontName by default is "HelveticalNeue"
fontName complies to the iOS font family names (refer to iOS SDK native documentation to know about supported font families). |
|
position |
Object
|
|
|
The position (center) of the text message. Applicable only on iOS platform. This will not have any impact on Android platform.
The message object will be overlay on top of an Image Capture Control with the center of the message being located at this coordinate.
Changes in the size of the capture control will usually require updating the position of the message as well.
position by default is "auto" position and is set appropriately which is suitable to the parent view.
once a new value for position is set (other than default) the "auto" quality is lost and the new value is used. If the value is changed it cannot be reset to default in the current instance. The object has to be recreated and set (typically an experience object has to be recreated).
position complies to the co-ordinate system in iOS. Setting arbitrarily large values is not recommended and behavior is not defined.
Properties
Name |
Type |
Attributes |
Description |
x |
Number
|
<optional>
|
x co-ordinate of the position |
y |
Number
|
<optional>
|
y co-ordinate of the position |
|
size |
Object
|
|
|
The Size of the text message. Applicable for iOS and Android.
The message object will be rendered with dimensions specified by this property. Text will be contained within this boundary, and any set background color will completely cover this area.
The default size has width -1 and height -1 which means an appropriate size is calculated and rendered.
If the value is changed it cannot be reset to default in the current instance.
In Android, rendering might differ based on device being used.
If the value is changed it cannot be reset to default in the current instance. The object on which this is applied has to be recreated and set (typically an experience object has to be recreated).
Whenever the orientation of the message has been changed, the size may have to be updated.
Properties
Name |
Type |
Attributes |
Description |
width |
Number
|
<optional>
|
width of the message |
height |
Number
|
<optional>
|
height of the message |
|
|
CenterMessage |
Object
|
|
page orientation message options
Properties
Name |
Type |
Attributes |
Default |
Description |
message |
String
|
<optional>
|
"Center Document"
|
The text of the message
Specifies the text of the message.
The default message is the empty string. You must set a message for anything to be displayed. |
textColor |
String
|
<optional>
|
"#FFFFFFFF"
|
The color used to display the text
Specifies the color that the message's text will be rendered with.
The default color is white. |
backgroundColor |
String
|
<optional>
|
"#00FFFFFFF"
|
The color used to display the background of the message
Specifies the color that the message's background are will be rendered with. The full area specified by the size property will be filled with the background color, excluding areas clipped outside of view bounds.
The default background color is transparent. |
visible |
Boolean
|
<optional>
|
true
|
The visibility of the message
Specifies whether the message is visible or not. A value of "false" will prevent the message from appearing. A value of "true" will show the message, if there is nothing else to prevent it from appearing.
The default value is true. Some objects that use messages, like the capture experience objects, will automatically manage and update this state. |
orientation |
String
|
<optional>
|
"LANDSCAPE"
|
The orientation of the message
Use one of the allowed values to set the orientation of the messages being displayed. Once a orientation is set, message stays in that orientation even if the device rotates.In other words this is sticky.
If you want to handle the rotation when device rotates, orientation has to be explicitly set again on the message.
The default value is LANDSCAPE. Allowable values are PORTRAIT, LANDSCAPE, REVERSEPORTRAIT, REVERSELANDSCAPE
If you modify the orientation of the message, plugin (underlying SDK) tries to optimally display the message however it may not always get displayed with appropriate size and font. It is recommended to set the size or font appropriately if needed. |
fontAndroid |
Object
|
|
|
The font used to display the text of the message on Android platform.
Properties
Name |
Type |
Attributes |
Description |
textSize |
Number
|
<optional>
|
The text font size of the message
The default is -1, which causes the message text font size to be determined as the SDK sees fit. |
|
fontiOS |
Object
|
|
|
The font used to display the text of the message on iOS platform.
Properties
Name |
Type |
Attributes |
Description |
fontSize |
Number
|
<optional>
|
fontSize the size of the text in the message
fontSize by default is -1 which means an optimal size is calculated and displayed.
fontSize generally accepts positive numbers.
Setting arbitrarily large values to fontSize may not render the font and behavior is not defined. |
fontName |
String
|
<optional>
|
fontName is the name of the font to be used for the message
fontName by default is "HelveticalNeue"
fontName complies to the iOS font family names (refer to iOS SDK native documentation to know about supported font families). |
|
position |
Object
|
|
|
The position (center) of the text message. Applicable only on iOS platform. This will not have any impact on Android platform.
The message object will be overlay on top of an Image Capture Control with the center of the message being located at this coordinate.
Changes in the size of the capture control will usually require updating the position of the message as well.
position by default is "auto" position and is set appropriately which is suitable to the parent view.
once a new value for position is set (other than default) the "auto" quality is lost and the new value is used. If the value is changed it cannot be reset to default in the current instance. The object has to be recreated and set (typically an experience object has to be recreated).
position complies to the co-ordinate system in iOS. Setting arbitrarily large values is not recommended and behavior is not defined.
Properties
Name |
Type |
Attributes |
Description |
x |
Number
|
<optional>
|
x co-ordinate of the position |
y |
Number
|
<optional>
|
y co-ordinate of the position |
|
size |
Object
|
|
|
The Size of the text message. Applicable for iOS and Android.
The message object will be rendered with dimensions specified by this property. Text will be contained within this boundary, and any set background color will completely cover this area.
The default size has width -1 and height -1 which means an appropriate size is calculated and rendered.
If the value is changed it cannot be reset to default in the current instance.
In Android, rendering might differ based on device being used.
If the value is changed it cannot be reset to default in the current instance. The object on which this is applied has to be recreated and set (typically an experience object has to be recreated).
Whenever the orientation of the message has been changed, the size may have to be updated.
Properties
Name |
Type |
Attributes |
Description |
width |
Number
|
<optional>
|
width of the message |
height |
Number
|
<optional>
|
height of the message |
|
|
UserInstructionMessage |
Object
|
|
no document found message options
Properties
Name |
Type |
Attributes |
Default |
Description |
message |
String
|
<optional>
|
"Fill viewable area with document"
|
The text of the message
Specifies the text of the message.
The default message is the empty string. You must set a message for anything to be displayed. |
textColor |
String
|
<optional>
|
"#FFFFFFFF"
|
The color used to display the text
Specifies the color that the message's text will be rendered with.
The default color is white. |
backgroundColor |
String
|
<optional>
|
"#00000000"
|
The color used to display the background of the message
Specifies the color that the message's background are will be rendered with. The full area specified by the size property will be filled with the background color, excluding areas clipped outside of view bounds.
The default background color is transparent. |
visible |
Boolean
|
<optional>
|
true
|
The visibility of the message
Specifies whether the message is visible or not. A value of "false" will prevent the message from appearing. A value of "true" will show the message, if there is nothing else to prevent it from appearing.
The default value is true. Some objects that use messages, like the capture experience objects, will automatically manage and update this state. |
orientation |
String
|
<optional>
|
"LANDSCAPE"
|
The orientation of the message
Use one of the allowed values to set the orientation of the messages being displayed. Once a orientation is set, message stays in that orientation even if the device rotates.In other words this is sticky.
If you want to handle the rotation when device rotates, orientation has to be explicitly set again on the message.
The default value is LANDSCAPE. Allowable values are PORTRAIT, LANDSCAPE, REVERSEPORTRAIT, REVERSELANDSCAPE
If you modify the orientation of the message, plugin (underlying SDK) tries to optimally display the message however it may not always get displayed with appropriate size and font. It is recommended to set the size or font appropriately if needed. |
fontAndroid |
Object
|
|
|
The font used to display the text of the message on Android platform.
Properties
Name |
Type |
Attributes |
Description |
textSize |
Number
|
<optional>
|
The text font size of the message
The default is -1, which causes the message text font size to be determined as the SDK sees fit. |
|
fontiOS |
Object
|
|
|
The font used to display the text of the message on iOS platform.
Properties
Name |
Type |
Attributes |
Description |
fontSize |
Number
|
<optional>
|
fontSize the size of the text in the message
fontSize by default is -1 which means an optimal size is calculated and displayed.
fontSize generally accepts positive numbers.
Setting arbitrarily large values to fontSize may not render the font and behavior is not defined. |
fontName |
String
|
<optional>
|
fontName is the name of the font to be used for the message
fontName by default is "HelveticalNeue"
fontName complies to the iOS font family names (refer to iOS SDK native documentation to know about supported font families). |
|
position |
Object
|
|
|
The position (center) of the text message. Applicable only on iOS platform. This will not have any impact on Android platform.
The message object will be overlay on top of an Image Capture Control with the center of the message being located at this coordinate.
Changes in the size of the capture control will usually require updating the position of the message as well.
position by default is "auto" position and is set appropriately which is suitable to the parent view.
once a new value for position is set (other than default) the "auto" quality is lost and the new value is used. If the value is changed it cannot be reset to default in the current instance. The object has to be recreated and set (typically an experience object has to be recreated).
position complies to the co-ordinate system in iOS. Setting arbitrarily large values is not recommended and behavior is not defined.
Properties
Name |
Type |
Attributes |
Description |
x |
Number
|
<optional>
|
x co-ordinate of the position |
y |
Number
|
<optional>
|
y co-ordinate of the position |
|
size |
Object
|
|
|
The Size of the text message. Applicable for iOS and Android.
The message object will be rendered with dimensions specified by this property. Text will be contained within this boundary, and any set background color will completely cover this area.
The default size has width -1 and height -1 which means an appropriate size is calculated and rendered.
If the value is changed it cannot be reset to default in the current instance.
In Android, rendering might differ based on device being used.
If the value is changed it cannot be reset to default in the current instance. The object on which this is applied has to be recreated and set (typically an experience object has to be recreated).
Whenever the orientation of the message has been changed, the size may have to be updated.
Properties
Name |
Type |
Attributes |
Description |
width |
Number
|
<optional>
|
width of the message |
height |
Number
|
<optional>
|
height of the message |
|
|
ZoomInMessage |
Object
|
|
zoom in message options
Properties
Name |
Type |
Attributes |
Default |
Description |
message |
String
|
<optional>
|
"Move Closer"
|
The text of the message
Specifies the text of the message.
The default message is the empty string. You must set a message for anything to be displayed. |
textColor |
String
|
<optional>
|
"#FFFFFFFF"
|
The color used to display the text
Specifies the color that the message's text will be rendered with.
The default color is white. |
backgroundColor |
String
|
<optional>
|
"#00FFFFFFF"
|
The color used to display the background of the message
Specifies the color that the message's background are will be rendered with. The full area specified by the size property will be filled with the background color, excluding areas clipped outside of view bounds.
The default background color is transparent. |
visible |
Boolean
|
<optional>
|
true
|
The visibility of the message
Specifies whether the message is visible or not. A value of "false" will prevent the message from appearing. A value of "true" will show the message, if there is nothing else to prevent it from appearing.
The default value is true. Some objects that use messages, like the capture experience objects, will automatically manage and update this state. |
orientation |
String
|
<optional>
|
"LANDSCAPE"
|
The orientation of the message
Use one of the allowed values to set the orientation of the messages being displayed. Once a orientation is set, message stays in that orientation even if the device rotates.In other words this is sticky.
If you want to handle the rotation when device rotates, orientation has to be explicitly set again on the message.
The default value is LANDSCAPE. Allowable values are PORTRAIT, LANDSCAPE, REVERSEPORTRAIT, REVERSELANDSCAPE
If you modify the orientation of the message, plugin (underlying SDK) tries to optimally display the message however it may not always get displayed with appropriate size and font. It is recommended to set the size or font appropriately if needed. |
fontAndroid |
Object
|
|
|
The font used to display the text of the message on Android platform.
Properties
Name |
Type |
Attributes |
Description |
textSize |
Number
|
<optional>
|
The text font size of the message
The default is -1, which causes the message text font size to be determined as the SDK sees fit. |
|
fontiOS |
Object
|
|
|
The font used to display the text of the message on iOS platform.
Properties
Name |
Type |
Attributes |
Description |
fontSize |
Number
|
<optional>
|
fontSize the size of the text in the message
fontSize by default is -1 which means an optimal size is calculated and displayed.
fontSize generally accepts positive numbers.
Setting arbitrarily large values to fontSize may not render the font and behavior is not defined. |
fontName |
String
|
<optional>
|
fontName is the name of the font to be used for the message
fontName by default is "HelveticalNeue"
fontName complies to the iOS font family names (refer to iOS SDK native documentation to know about supported font families). |
|
position |
Object
|
|
|
The position (center) of the text message. Applicable only on iOS platform. This will not have any impact on Android platform.
The message object will be overlay on top of an Image Capture Control with the center of the message being located at this coordinate.
Changes in the size of the capture control will usually require updating the position of the message as well.
position by default is "auto" position and is set appropriately which is suitable to the parent view.
once a new value for position is set (other than default) the "auto" quality is lost and the new value is used. If the value is changed it cannot be reset to default in the current instance. The object has to be recreated and set (typically an experience object has to be recreated).
position complies to the co-ordinate system in iOS. Setting arbitrarily large values is not recommended and behavior is not defined.
Properties
Name |
Type |
Attributes |
Description |
x |
Number
|
<optional>
|
x co-ordinate of the position |
y |
Number
|
<optional>
|
y co-ordinate of the position |
|
size |
Object
|
|
|
The Size of the text message. Applicable for iOS and Android.
The message object will be rendered with dimensions specified by this property. Text will be contained within this boundary, and any set background color will completely cover this area.
The default size has width -1 and height -1 which means an appropriate size is calculated and rendered.
If the value is changed it cannot be reset to default in the current instance.
In Android, rendering might differ based on device being used.
If the value is changed it cannot be reset to default in the current instance. The object on which this is applied has to be recreated and set (typically an experience object has to be recreated).
Whenever the orientation of the message has been changed, the size may have to be updated.
Properties
Name |
Type |
Attributes |
Description |
width |
Number
|
<optional>
|
width of the message |
height |
Number
|
<optional>
|
height of the message |
|
|
ZoomOutMessage |
Object
|
|
zoom out message options
Properties
Name |
Type |
Attributes |
Default |
Description |
message |
String
|
<optional>
|
"Move Back"
|
The text of the message
Specifies the text of the message.
The default message is the empty string. You must set a message for anything to be displayed. |
textColor |
String
|
<optional>
|
"#FFFFFFFF"
|
The color used to display the text
Specifies the color that the message's text will be rendered with.
The default color is white. |
backgroundColor |
String
|
<optional>
|
"#00FFFFFFF"
|
The color used to display the background of the message
Specifies the color that the message's background are will be rendered with. The full area specified by the size property will be filled with the background color, excluding areas clipped outside of view bounds.
The default background color is transparent. |
visible |
Boolean
|
<optional>
|
true
|
The visibility of the message
Specifies whether the message is visible or not. A value of "false" will prevent the message from appearing. A value of "true" will show the message, if there is nothing else to prevent it from appearing.
The default value is true. Some objects that use messages, like the capture experience objects, will automatically manage and update this state. |
orientation |
String
|
<optional>
|
"LANDSCAPE"
|
The orientation of the message
Use one of the allowed values to set the orientation of the messages being displayed. Once a orientation is set, message stays in that orientation even if the device rotates.In other words this is sticky.
If you want to handle the rotation when device rotates, orientation has to be explicitly set again on the message.
The default value is LANDSCAPE. Allowable values are PORTRAIT, LANDSCAPE, REVERSEPORTRAIT, REVERSELANDSCAPE
If you modify the orientation of the message, plugin (underlying SDK) tries to optimally display the message however it may not always get displayed with appropriate size and font. It is recommended to set the size or font appropriately if needed. |
fontAndroid |
Object
|
|
|
The font used to display the text of the message on Android platform.
Properties
Name |
Type |
Attributes |
Description |
textSize |
Number
|
<optional>
|
The text font size of the message
The default is -1, which causes the message text font size to be determined as the SDK sees fit. |
|
fontiOS |
Object
|
|
|
The font used to display the text of the message on iOS platform.
Properties
Name |
Type |
Attributes |
Description |
fontSize |
Number
|
<optional>
|
fontSize the size of the text in the message
fontSize by default is -1 which means an optimal size is calculated and displayed.
fontSize generally accepts positive numbers.
Setting arbitrarily large values to fontSize may not render the font and behavior is not defined. |
fontName |
String
|
<optional>
|
fontName is the name of the font to be used for the message
fontName by default is "HelveticalNeue"
fontName complies to the iOS font family names (refer to iOS SDK native documentation to know about supported font families). |
|
position |
Object
|
|
|
The position (center) of the text message. Applicable only on iOS platform. This will not have any impact on Android platform.
The message object will be overlay on top of an Image Capture Control with the center of the message being located at this coordinate.
Changes in the size of the capture control will usually require updating the position of the message as well.
position by default is "auto" position and is set appropriately which is suitable to the parent view.
once a new value for position is set (other than default) the "auto" quality is lost and the new value is used. If the value is changed it cannot be reset to default in the current instance. The object has to be recreated and set (typically an experience object has to be recreated).
position complies to the co-ordinate system in iOS. Setting arbitrarily large values is not recommended and behavior is not defined.
Properties
Name |
Type |
Attributes |
Description |
x |
Number
|
<optional>
|
x co-ordinate of the position |
y |
Number
|
<optional>
|
y co-ordinate of the position |
|
size |
Object
|
|
|
The Size of the text message. Applicable for iOS and Android.
The message object will be rendered with dimensions specified by this property. Text will be contained within this boundary, and any set background color will completely cover this area.
The default size has width -1 and height -1 which means an appropriate size is calculated and rendered.
If the value is changed it cannot be reset to default in the current instance.
In Android, rendering might differ based on device being used.
If the value is changed it cannot be reset to default in the current instance. The object on which this is applied has to be recreated and set (typically an experience object has to be recreated).
Whenever the orientation of the message has been changed, the size may have to be updated.
Properties
Name |
Type |
Attributes |
Description |
width |
Number
|
<optional>
|
width of the message |
height |
Number
|
<optional>
|
height of the message |
|
|
RotateMessage |
Object
|
|
Rotate message options
Properties
Name |
Type |
Attributes |
Default |
Description |
message |
String
|
<optional>
|
"Rotate Device"
|
The text of the message
Specifies the text of the message.
You can customize a message for anything to be displayed. |
textColor |
String
|
<optional>
|
"#FFFFFFFF"
|
The color used to display the text
Specifies the color that the message's text will be rendered with.
The default color is white. |
backgroundColor |
String
|
<optional>
|
"#00FFFFFFF"
|
The color used to display the background of the message
Specifies the color that the message's background are will be rendered with. The full area specified by the size property will be filled with the background color, excluding areas clipped outside of view bounds.
The default background color is transparent. |
visible |
Boolean
|
<optional>
|
ture
|
The visibility of the message
Specifies whether the message is visible or not. A value of "false" will prevent the message from appearing. A value of "true" will show the message, if there is nothing else to prevent it from appearing.
The default value is true. Some objects that use messages, like the capture experience objects, will automatically manage and update this state. |
orientation |
String
|
<optional>
|
"LANDSCAPE"
|
The orientation of the message
Use one of the allowed values to set the orientation of the messages being displayed. Once a orientation is set, message stays in that orientation even if the device rotates.In other words this is sticky.
If you want to handle the rotation when device rotates, orientation has to be explicitly set again on the message.
The default value is LANDSCAPE. Allowable values are PORTRAIT, LANDSCAPE, REVERSEPORTRAIT, REVERSELANDSCAPE
If you modify the orientation of the message, plugin (underlying SDK) tries to optimally display the message however it may not always get displayed with appropriate size and font. It is recommended to set the size or font appropriately if needed. |
fontAndroid |
Object
|
|
|
The font used to display the text of the message on Android platform.
Properties
Name |
Type |
Attributes |
Description |
textSize |
Number
|
<optional>
|
The text font size of the message
The default is -1, which causes the message text font size to be determined as the SDK sees fit. |
|
fontiOS |
Object
|
|
|
The font used to display the text of the message on iOS platform.
Properties
Name |
Type |
Attributes |
Description |
fontSize |
Number
|
<optional>
|
fontSize the size of the text in the message
fontSize by default is -1 which means an optimal size is calculated and displayed.
fontSize generally accepts positive numbers.
Setting arbitrarily large values to fontSize may not render the font and behavior is not defined. |
fontName |
String
|
<optional>
|
fontName is the name of the font to be used for the message
fontName by default is "HelveticalNeue"
fontName complies to the iOS font family names (refer to iOS SDK native documentation to know about supported font families). |
|
position |
Object
|
|
|
The position (center) of the text message. Applicable only on iOS platform. This will not have any impact on Android platform.
The message object will be overlay on top of an Image Capture Control with the center of the message being located at this coordinate.
Changes in the size of the capture control will usually require updating the position of the message as well.
position by default is "auto" position and is set appropriately which is suitable to the parent view.
once a new value for position is set (other than default) the "auto" quality is lost and the new value is used. If the value is changed it cannot be reset to default in the current instance. The object has to be recreated and set (typically an experience object has to be recreated).
position complies to the co-ordinate system in iOS. Setting arbitrarily large values is not recommended and behavior is not defined.
Properties
Name |
Type |
Attributes |
Description |
x |
Number
|
<optional>
|
x co-ordinate of the position |
y |
Number
|
<optional>
|
y co-ordinate of the position |
|
size |
Object
|
|
|
The Size of the text message. Applicable for iOS and Android.
The message object will be rendered with dimensions specified by this property. Text will be contained within this boundary, and any set background color will completely cover this area.
The default size has width -1 and height -1 which means an appropriate size is calculated and rendered.
If the value is changed it cannot be reset to default in the current instance.
In Android, rendering might differ based on device being used.
If the value is changed it cannot be reset to default in the current instance. The object on which this is applied has to be recreated and set (typically an experience object has to be recreated).
Whenever the orientation of the message has been changed, the size may have to be updated.
Properties
Name |
Type |
Attributes |
Description |
width |
Number
|
<optional>
|
width of the message |
height |
Number
|
<optional>
|
height of the message |
|
|
HoldParallelMessage |
Object
|
|
Hold Parallel Message options
Properties
Name |
Type |
Attributes |
Default |
Description |
message |
String
|
<optional>
|
"Hold Device Level"
|
The text of the message
Specifies the text of the message.
You can customize a message for anything to be displayed. |
textColor |
String
|
<optional>
|
"#FFFFFFFF"
|
The color used to display the text
Specifies the color that the message's text will be rendered with.
The default color is white. |
backgroundColor |
String
|
<optional>
|
"#00FFFFFFF"
|
The color used to display the background of the message
Specifies the color that the message's background are will be rendered with. The full area specified by the size property will be filled with the background color, excluding areas clipped outside of view bounds.
The default background color is transparent. |
visible |
Boolean
|
<optional>
|
true
|
The visibility of the message
Specifies whether the message is visible or not. A value of "false" will prevent the message from appearing. A value of "true" will show the message, if there is nothing else to prevent it from appearing.
The default value is true. Some objects that use messages, like the capture experience objects, will automatically manage and update this state. |
orientation |
String
|
<optional>
|
"LANDSCAPE"
|
The orientation of the message
Use one of the allowed values to set the orientation of the messages being displayed. Once a orientation is set, message stays in that orientation even if the device rotates.In other words this is sticky.
If you want to handle the rotation when device rotates, orientation has to be explicitly set again on the message.
The default value is LANDSCAPE. Allowable values are PORTRAIT, LANDSCAPE, REVERSEPORTRAIT, REVERSELANDSCAPE
If you modify the orientation of the message, plugin (underlying SDK) tries to optimally display the message however it may not always get displayed with appropriate size and font. It is recommended to set the size or font appropriately if needed. |
fontAndroid |
Object
|
|
|
The font used to display the text of the message on Android platform.
Properties
Name |
Type |
Attributes |
Description |
textSize |
Number
|
<optional>
|
The text font size of the message
The default is -1, which causes the message text font size to be determined as the SDK sees fit. |
|
fontiOS |
Object
|
|
|
The font used to display the text of the message on iOS platform.
Properties
Name |
Type |
Attributes |
Description |
fontSize |
Number
|
<optional>
|
fontSize the size of the text in the message
fontSize by default is -1 which means an optimal size is calculated and displayed.
fontSize generally accepts positive numbers.
Setting arbitrarily large values to fontSize may not render the font and behavior is not defined. |
fontName |
String
|
<optional>
|
fontName is the name of the font to be used for the message
fontName by default is "HelveticalNeue"
fontName complies to the iOS font family names (refer to iOS SDK native documentation to know about supported font families). |
|
position |
Object
|
|
|
The position (center) of the text message. Applicable only on iOS platform. This will not have any impact on Android platform.
The message object will be overlay on top of an Image Capture Control with the center of the message being located at this coordinate.
Changes in the size of the capture control will usually require updating the position of the message as well.
position by default is "auto" position and is set appropriately which is suitable to the parent view.
once a new value for position is set (other than default) the "auto" quality is lost and the new value is used. If the value is changed it cannot be reset to default in the current instance. The object has to be recreated and set (typically an experience object has to be recreated).
position complies to the co-ordinate system in iOS. Setting arbitrarily large values is not recommended and behavior is not defined.
Properties
Name |
Type |
Attributes |
Description |
x |
Number
|
<optional>
|
x co-ordinate of the position |
y |
Number
|
<optional>
|
y co-ordinate of the position |
|
size |
Object
|
|
|
The Size of the text message. Applicable for iOS and Android.
The message object will be rendered with dimensions specified by this property. Text will be contained within this boundary, and any set background color will completely cover this area.
The default size has width -1 and height -1 which means an appropriate size is calculated and rendered.
If the value is changed it cannot be reset to default in the current instance.
In Android, rendering might differ based on device being used.
If the value is changed it cannot be reset to default in the current instance. The object on which this is applied has to be recreated and set (typically an experience object has to be recreated).
Whenever the orientation of the message has been changed, the size may have to be updated.
Properties
Name |
Type |
Attributes |
Description |
width |
Number
|
<optional>
|
width of the message |
height |
Number
|
<optional>
|
height of the message |
|
|
TutorialDismissMessage |
Object
|
|
Tutorial Dismiss Message options
Properties
Name |
Type |
Attributes |
Default |
Description |
message |
String
|
<optional>
|
"Tap to dismiss"
|
The text of the message
Specifies the text of the message.
You can customize a message for anything to be displayed. |
textColor |
String
|
<optional>
|
"#FFFFFFFF"
|
The color used to display the text
Specifies the color that the message's text will be rendered with.
The default color is white. |
backgroundColor |
String
|
<optional>
|
"#00000000"
|
The color used to display the background of the message
Specifies the color that the message's background are will be rendered with. The full area specified by the size property will be filled with the background color, excluding areas clipped outside of view bounds.
The default background color is transparent. |
visible |
Boolean
|
<optional>
|
true
|
The visibility of the message
Specifies whether the message is visible or not. A value of "false" will prevent the message from appearing. A value of "true" will show the message, if there is nothing else to prevent it from appearing.
The default value is true. Some objects that use messages, like the capture experience objects, will automatically manage and update this state. |
orientation |
String
|
<optional>
|
"LANDSCAPE"
|
The orientation of the message
Use one of the allowed values to set the orientation of the messages being displayed. Once a orientation is set, message stays in that orientation even if the device rotates.In other words this is sticky.
If you want to handle the rotation when device rotates, orientation has to be explicitly set again on the message.
The default value is LANDSCAPE. Allowable values are PORTRAIT, LANDSCAPE, REVERSEPORTRAIT, REVERSELANDSCAPE
If you modify the orientation of the message, plugin (underlying SDK) tries to optimally display the message however it may not always get displayed with appropriate size and font. It is recommended to set the size or font appropriately if needed. |
fontAndroid |
Object
|
|
|
The font used to display the text of the message on Android platform.
Properties
Name |
Type |
Attributes |
Description |
textSize |
Number
|
<optional>
|
The text font size of the message
The default is -1, which causes the message text font size to be determined as the SDK sees fit. |
|
fontiOS |
Object
|
|
|
The font used to display the text of the message on iOS platform.
Properties
Name |
Type |
Attributes |
Description |
fontSize |
Number
|
<optional>
|
fontSize the size of the text in the message
fontSize by default is -1 which means an optimal size is calculated and displayed.
fontSize generally accepts positive numbers.
Setting arbitrarily large values to fontSize may not render the font and behavior is not defined. |
fontName |
String
|
<optional>
|
fontName is the name of the font to be used for the message
fontName by default is "HelveticalNeue"
fontName complies to the iOS font family names (refer to iOS SDK native documentation to know about supported font families). |
|
position |
Object
|
|
|
The position (center) of the text message. Applicable only on iOS platform. This will not have any impact on Android platform.
The message object will be overlay on top of an Image Capture Control with the center of the message being located at this coordinate.
Changes in the size of the capture control will usually require updating the position of the message as well.
position by default is "auto" position and is set appropriately which is suitable to the parent view.
once a new value for position is set (other than default) the "auto" quality is lost and the new value is used. If the value is changed it cannot be reset to default in the current instance. The object has to be recreated and set (typically an experience object has to be recreated).
position complies to the co-ordinate system in iOS. Setting arbitrarily large values is not recommended and behavior is not defined.
Properties
Name |
Type |
Attributes |
Description |
x |
Number
|
<optional>
|
x co-ordinate of the position |
y |
Number
|
<optional>
|
y co-ordinate of the position |
|
size |
Object
|
|
|
The Size of the text message. Applicable for iOS and Android.
The message object will be rendered with dimensions specified by this property. Text will be contained within this boundary, and any set background color will completely cover this area.
The default size has width -1 and height -1 which means an appropriate size is calculated and rendered.
If the value is changed it cannot be reset to default in the current instance.
In Android, rendering might differ based on device being used.
If the value is changed it cannot be reset to default in the current instance. The object on which this is applied has to be recreated and set (typically an experience object has to be recreated).
Whenever the orientation of the message has been changed, the size may have to be updated.
Properties
Name |
Type |
Attributes |
Description |
width |
Number
|
<optional>
|
width of the message |
height |
Number
|
<optional>
|
height of the message |
|
|
|
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - success string indicating the method has been invoked
errorCallback - error in case any error occurs
Example
function successCallback(response){
alert(JSON.stringify(response));
}
function errorCallback(error){
alert(JSON.stringify(error));
}
var imageCaptureControl = kfxCordova.kfxUicontrols.createImageCaptureControl();
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
var imageCaptureControlID = null;
imageCaptureControl.getId(function(captureControlID){
imageCaptureControlID = captureControlID;
},function(error){
alert(JSON.stringify(error));
});
documentCaptureExperience.bindCaptureControl(function(success){alert(JSON.stringify(success));},function(error){alert(JSON.stringify(error));},imageCaptureControlID);
//get the options
documentCaptureExperience.getOptions(function(success){documentCaptureExperienceOptions = success},myerrorCB);
//specify the values for the Document Capture Experience
documentCaptureExperienceOptions.CaptureCriteria.focusEnabled = false;
//specify the path for tutorial sample image, which is relative to www folder.
documentCaptureExperienceOptions.LookAndFeel.tutorialSampleImagePath = 'www/images/custom_tutorialimage.png';
//set the options to capture view
documentCaptureExperience.setOptions(successCallback,errorCallback,documentCaptureExperienceOptions)
stopCapture(successCallback, errorCallback)
Calling this method will stop the image capture process. In case of continuous capture also no further images would be captured after this API is called even if the device declination is changed
Parameters:
Name |
Type |
Description |
successCallback |
function
|
Default Success call back function name |
errorCallback |
function
|
Default Error call back function name |
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - success string indicating the method has been invoked
errorCallback - error in case any error occurs
Example
function successCallback(response){
alert(JSON.stringify(response));
}
function errorCallback(error){
alert(JSON.stringify(error));
}
var imageCaptureControl = kfxCordova.kfxUicontrols.createImageCaptureControl();
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
var imageCaptureControlID = null;
imageCaptureControl.getId(function(captureControlID){
imageCaptureControlID = captureControlID;
},function(error){
alert(JSON.stringify(error));
});
documentCaptureExperience.bindCaptureControl(function(success){alert(JSON.stringify(success));},function(error){alert(JSON.stringify(error));},imageCaptureControlID);
documentCaptureExperience.stopCapture(successCallback,errorCallback);
takePicture(successCB:, errorCB:)
Calling this method will start the process of monitoring the various constraints passed to determine when a level, focused, and non-blurry shot of the document can be taken.
The event listener "addImageCapturedListener" will receive the delegate call back message and will have the corresponding capture image details.
Parameters:
Name |
Type |
Description |
successCB: |
|
Default Success call back function name |
errorCB: |
|
Default Error call back function name |
Returns:
The return value is captured in the 'successCB' for a successful operation, and might return in 'errorCB' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCB : success string indicating the method has been invoked
errorCB : error in case any error occurs
Example
var imageCaptureControl = kfxCordova.kfxUicontrols.createImageCaptureControl();
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
var imageCaptureControlID = null;
imageCaptureControl.getId(function(captureControlID){
imageCaptureControlID = captureControlID;
},function(error){
alert(JSON.stringify(error));
});
documentCaptureExperience.bindCaptureControl(function(success){alert(JSON.stringify(success));},function(error){alert(JSON.stringify(error));},imageCaptureControlID);
documentCaptureExperience.takePicture(function(success){alert(JSON.stringify(success));},function(error){alert(JSON.stringify(error));});
takePictureContinually(successCallback, errorCallback)
Calling this method will start the process of monitoring the various constraints passed to determine when a level, focused, and non-blurry shot of the document can be taken.
The event listener "addImageCapturedListener" will receive the delegate call back message and will have the corresponding capture image details.
This method will take pictures continuously. The pitch or roll of the device has to be changed from the set device declination values between each capture.
Parameters:
Name |
Type |
Description |
successCallback |
function
|
Default Success call back function name |
errorCallback |
function
|
Default Error call back function name |
Returns:
The return value is captured in the 'successCallback' for a successful operation, and might return in 'errorCallback' for an incomplete/invalid operation. Returns the following values in the corresponding functions
successCallback - success string indicating the method has been invoked
errorCallback - error in case any error occurs
Example
var imageCaptureControl = kfxCordova.kfxUicontrols.createImageCaptureControl();
var documentCaptureExperience = kfxCordova.kfxUicontrols.createDocumentCaptureExperience();
var imageCaptureControlID = null;
imageCaptureControl.getId(function(captureControlID){
imageCaptureControlID = captureControlID;
},function(error){
alert(JSON.stringify(error));
});
documentCaptureExperience.bindCaptureControl(function(success){alert(JSON.stringify(success));},function(error){alert(JSON.stringify(error));},imageCaptureControlID);
documentCaptureExperience.takePictureContinually(function(success){alert(JSON.stringify(success));},function(error){alert(JSON.stringify(error));});