Anyline View Configuration
With the Anyline View Configuration, you can define the Look & Feel of your scanning app.
The configuration parameters define the visual information presented to the user, as well as the scan settings (like the resolution, etc.) and feedback that is presented to the user.
This section shows an example and lists all parameters with their description.
If you are looking for a How-To on loading the Anyline View Configuration on your platform, please refer to the following sections:
- iOS: How to add the View Configuration
- Android: How to add the View Configuration
- Windows: Initialize Anyline
- Cordova: View Configuration and additional parameters
- Xamarin.iOS: Initialize Anyline
- Xamarin.Android: Initialize Anyline
- ReactNative: View Configuration and additional parameters
Example
Warning
With anyline 4 we have two types of json files. One of them contains also the scan plugin specified in it. With this, all the parameters specific (e.g. scanMode, charWhitelist) to the scan plugin should not be specified in the code anymore, but in the json.
This is a full example of a view configuration containing the scan plugin. You can just copy and paste this to your application and adjust it if is needed.
{
"camera": {
"captureResolution": "720",
"pictureResolution": "1080",
"zoomGesture" : true
},
"flash": {
"mode": "manual",
"alignment": "bottom_right",
"imageOn": "flash_on",
"imageOff": "flash_off"
},
"viewPlugin": {
"plugin" : {
"id" : "OCR",
"ocrPlugin" : {
"scanMode" : "AUTO",
"languages" : ["anyline_capitals.traineddata"],
"charWhitelist": "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",
"validationRegex": "[A-Z0-9]{8}$"
}
},
"cutoutConfig": {
"style": "rect",
"maxWidthPercent": "80%",
"maxHeightPercent": "80%",
"alignment": "center",
"width": 540,
"ratioFromSize": {
"width": 5,
"height": 1
},
"offset": {
"x": 0,
"y": 0
},
"cropPadding": {
"x": 0,
"y": 0
},
"cropOffset": {
"x": 0,
"y": 0
},
"strokeWidth": 2,
"cornerRadius": 10,
"strokeColor": "FFFFFF",
"outerColor": "000000",
"outerAlpha": 0.3,
"feedbackStrokeColor": "0099FF"
},
"scanFeedback": {
"style": "contour_point",
"strokeWidth": 2,
"strokeColor": "0099FF",
"fillColor": "220099FF",
"beepOnResult": true,
"vibrateOnResult": true,
"blinkAnimationOnResult": true
},
"cancelOnResult": true,
"delayStartScanTime": 2000
}
}
This is a full example of a view configuration without the Scan Plugin. You can set the Scan Plugin explicitly in code. You can just copy and paste this to your application and adjust it as needed.
{
"camera": {
"captureResolution": "720",
"pictureResolution": "1080",
"zoomGesture" : true,
"zoomRatio" : 1.5 ,
"maxZoomRatio" : 3.5
},
"flash": {
"mode": "manual",
"alignment": "bottom_right",
"imageOn": "flash_on",
"imageOff": "flash_off"
},
"viewPlugin": {
"cutoutConfig": {
"style": "rect",
"maxWidthPercent": "80%",
"maxHeightPercent": "80%",
"alignment": "center",
"width": 540,
"ratioFromSize": {
"width": 5,
"height": 1
},
"offset": {
"x": 0,
"y": 0
},
"cropPadding": {
"x": 0,
"y": 0
},
"cropOffset": {
"x": 0,
"y": 0
},
"strokeWidth": 2,
"cornerRadius": 10,
"strokeColor": "FFFFFF",
"outerColor": "000000",
"outerAlpha": 0.3,
"feedbackStrokeColor": "0099FF",
"animation": "none"
},
"scanFeedback": {
"style": "contour_point",
"strokeWidth": 2,
"strokeColor": "0099FF",
"fillColor": "220099FF",
"beepOnResult": true,
"vibrateOnResult": true,
"blinkAnimationOnResult": true
},
"cancelOnResult": true,
"delayStartScanTime": 2000
}
}
This is a full example of a view configuration with a Composite Scan View Plugin. A composite scan plugin must have all the parameters for the child scan plugins in the json.
{
"serialViewPluginComposite": {
"id": "CATTLE_DL_VIN",
"cancelOnResult": true,
"viewPlugins": [
{
"viewPlugin": {
"plugin": {
"id": "CATTLE_TAG",
"ocrPlugin": {
"cattleTagConfig": {}
}
},
"cutoutConfig": {
"style": "rect",
"maxWidthPercent": "65%",
"alignment": "top_half",
"ratioFromSize": {
"width": 200,
"height": 300
},
"offset": {
"x": 0,
"y": 150
},
"strokeWidth": 2,
"cornerRadius": 6,
"strokeColor": "FFFFFF",
"outerAlpha": 0.3,
"feedbackStrokeColor": "0099FF"
},
"scanFeedback": {
"style": "rect",
"strokeColor": "0099FF",
"fillColor": "330099FF",
"beepOnResult": true,
"vibrateOnResult": true,
"blinkAnimationOnResult": true
}
}
},
{
"viewPlugin": {
"plugin": {
"id": "DRIVING_LICENSE",
"idPlugin": {
"universalIdConfig": {
"allowedLayouts": {
"drivingLicense": []
},
"drivingLicense": {
"lastName": {"scanOption": 0, "minConfidence": 40},
"firstName": {"scanOption": 0, "minConfidence": 40},
"fullName": {"scanOption": 0, "minConfidence": 40},
"dateOfBirth": {"scanOption": 0, "minConfidence": 50},
"placeOfBirth": {"scanOption": 1, "minConfidence": 50},
"dateOfIssue": {"scanOption": 0, "minConfidence": 50},
"dateOfExpiry": {"scanOption": 1, "minConfidence": 50},
"authority": {"scanOption": 1, "minConfidence": 30},
"documentNumber": {"scanOption": 0, "minConfidence": 40},
"licenseClass": {"scanOption": 1, "minConfidence": 30},
"address": {"scanOption": 0},
"sex": {"scanOption": 1,"minConfidence": 60},
"personalNumber": {"scanOption": 1,"minConfidence": 60}
},
}
}
},
"cutoutConfig": {
"style": "rect",
"maxWidthPercent": "80%",
"alignment": "center",
"ratioFromSize": {
"width": 560,
"height": 354
},
"strokeWidth": 2,
"cornerRadius": 4,
"strokeColor": "FFFFFF",
"outerColor": "000000",
"outerAlpha": 0.3,
"feedbackStrokeColor": "0099FF"
},
"scanFeedback": {
"fillColor": "220099FF",
"style": "CONTOUR_POINT",
"strokeColor": "0099FF",
"strokeWidth": 2,
"blinkOnResult": true,
"beepOnResult": true,
"vibrateOnResult": true
}
}
},
{
"viewPlugin": {
"plugin": {
"id": "VIN",
"ocrPlugin": {
"vinConfig": {}
}
},
"cutoutConfig": {
"style": "rect",
"maxWidthPercent": "70%",
"alignment": "center",
"ratioFromSize": {
"width": 62,
"height": 16
},
"outerColor": "000000",
"outerAlpha": 0.3,
"strokeWidth": 2,
"strokeColor": "FFFFFF",
"cornerRadius": 4,
"feedbackStrokeColor": "0099FF"
},
"scanFeedback": {
"animation": "traverse_multi",
"animationDuration": 250,
"style": "contour_rect",
"strokeWidth": 2,
"strokeColor": "0099FF",
"fillColor": "220099FF",
"beepOnResult": true,
"vibrateOnResult": true,
"blinkAnimationOnResult": true
}
}
}
]
}
}
Full Parameter List
Warning
Some of the following parameters, like flash, `scanFeedback.beepOnResult`_ and so on, will only have an effect if the device has a flash or built in speakers.
camera
The following parameters define the camera parameters.
camera.captureResolution
Defines the width of the frames that are processed in the SDK.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
480 , 720 , 1080 , … |
Pixel | String | 720 |
✗ |
Aspect Ratio
The aspect ratio is always 16:9, so a value of 480 results in a resolution of 480x854.
Android
The capture resolution is more like a suggestion, because the available preview resolutions vary from device to device. If the preferred resolution is available, it is used. Otherwise the highest available resolution smaller than the desired value is used.
iOS
The captureResolution
is set to 1080 on iOS, as this setting provides the best results.
camera.pictureResolution
Defines the resolution of the full picture taken from the camera (optional). This parameter is only of interest when using the document_module module.
Default is set to the maximum available resolution of the device.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
1080 , 1260 , … |
Pixel | String | max |
✗ |
Aspect Ratio
The aspect ratio is always 16:9, so a value of 480 results in a resolution of 480x854.
Android
The picture resolution is more like a suggestion, because the available picture resolutions vary from device to device. If the preferred resolution is available, it is used. Otherwise the lowest available resolution bigger than the desired value is used.
iOS
The highest possible resolution for iOS is 1080. However if you specify a higher value for picture resolution we will return a high resolution photo of the found document as result. Therefore it is also possible to specify “photo” as value if you want to get a high resolution result.
New in version 9.
camera.zoomGesture
Enables pinch-to-zoom for the Camera (optional). Default is set to false and zooming with a pinch gesture is disabled.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
true or false |
boolean | boolean | false |
✗ |
New in version 9.
camera.zoomRatio
Sets a zoom ratio to the camera, which is defined as the ratio of the maximum focal length of the camera to the current focal length. The zoom ratio is given in “times” zoom, e.g. a value set of 2.5 would be equal to 2.5X zoom. The maximum settable value (max) is the maximum zoom Ratio supported by the camera.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
1 - max | ‘-’ | Double | 1 | ✗ |
New in version 9.
camera.maxZoomRatio
Sets a custom maximum zoom ratio to the camera. This is useful if the camera supports zoom levels at which a scan might not be successfull due to bad image quality, making it possible to limit the user to have only useful zoom levels available. Per default, if not set, the maximum zoom ratio will be the same as the maximum zoom ratio of the camera.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
1 - max | ‘-’ | Double | 0 | ✗ |
flash
Defines the settings for adding a view that provides a simple on/off/auto flash button functionality.
Error
Currently imageOn, imageOff and imageAuto are not supported on iOS.
flash.mode
Specifies which options the flash view provides.
Value | Description |
---|---|
none |
The flash view is not used, and not displayed |
manual |
The flash can be toggled manually (default is off) |
auto |
If an AnylineView is used for scanning, the flash will bet turned on automatically if the ambient light is too dark. Otherwise this mode has no effect. |
flash.alignment
Defines where the flash view will be displayed.
Value | Description |
---|---|
top |
The flash view will be displayed at the top, centered horizontally |
top_left |
The flash view will be displayed in the top left corner |
top_right |
The flash view will be displayed in the top right corner |
bottom |
The flash view will be displayed at the bottom, centered horizontally |
bottom_left |
The flash view will be displayed in the bottom left corner |
bottom_right |
The flash view will be displayed in the bottom right corner |
flash.imageOn
Sets the filename of the image to be used if the flash is turned on.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | - | String | - | ✗ |
Warning
The file extension has to be ommitted in this parameter
Android: Where to put the image?
The image has to be placed inside the res/drawable folder on Android
iOS: Where to put the image?
The image has to be placed somewhere in the main bundle
flash.imageOff
Sets the filename of the image to be used if the flash is turned off.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | - | String | - | ✗ |
Warning
The file extension has to be ommitted in this parameter
Android: Where to put the image?
The image has to be placed inside the res/drawable folder on Android
iOS: Where to put the image?
The image has to be placed somewhere in the main bundle
flash.imageAuto
Sets the filename of the image to be used if the flash is set to auto.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | - | String | - | ✗ |
Warning
The file extension has to be ommitted in this parameter
Android: Where to put the image?
The image has to be placed inside the res/drawable folder on Android
iOS: Where to put the image?
The image has to be placed somewhere in the main bundle
flash.offset
Moves the flash view to the left and up (negative values) or to the right and down (positive values), relative to the flash.alignment.
flash.offset.x
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | dpi / Pixel | Integer | 0 | ✗ |
Android
This parameters Unit is density-independent pixel (dp)
iOS
This parameters Unit is pixel
flash.offset.y
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | dpi / Pixel | Integer | 0 | ✗ |
Android
This parameters Unit is density-independent pixel (dp)
iOS
This parameters Unit is pixel
viewPlugin
The viewPlugin
parameter contains the scan configuration for the cutout and scan feedback.
Bellow are described all the parameters for each component of viewPlugin
.
viewPlugin.plugin
The plugin is an optional parameter. In case is set, there will be initialized internally the scanViewPlugin and scanPlugin in the SDK.
viewPlugin.cutoutConfig
The following parameters define the look of the overlay-cutout, which is used to guide the user to target the item to scan.
The Anyline SDK only receives the part of the image inside the cutout. So anything outside of the cutout cannot be scanned.
Cutout and Focus
Please keep in mind that there is a relationship between the size of the cutout, and how close/far the user will hold the phone from the object. Choosing a cutout that is too large for a small object, will intuitively force the user to move closer with the phone to the object. This may result in an incorrectly set focus on some devices, as the minimal distance between the object and the camera needs to be up to ~12cm in auto-focus mode in some cases, and ~7.5cm in macro- or continuous focus mode.
viewPlugin.cutoutConfig.style
If no cutoutConfig.style is specified, rect is the default.
Value | Description |
---|---|
RECT |
The rect is animated from the cutout to the found text area within the specified animation time |
IMAGE |
Deprecated. Please do not use. |
ANIMATED_RECT |
A rectangle with a pulsing animation. |
ANIMATED_CIRCLE |
Deprecated. Please do not use. |
NONE |
No cutout. |
NONE cutout style
viewPlugin.plugin.enableFullFrameScanning
needs to be enabled to scan without a cutout.
viewPlugin.cutoutConfig.width
Specifies the width of the cutout. If this is bigger than the width of the view, it will be limited to the view’s width.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | Pixel | Integer | - | ✗ |
Preview-Width and Display-Width
Android devices may have a 720p preview but only a 540p wide display. If a width of 600 is specified, the cutout will still only be 540
viewPlugin.cutoutConfig.maxWidthPercent
Specifies the maximum width of the cutout in percent.
This represents the desired width if the viewPlugin.cutoutConfig.width parameter is not used.
If the cutout width is set to a 100% of the screen width, will not be visible on the respective sides, since it covers 100% of the screen.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
1% - 100% |
Percent | String | 100% |
✗ |
viewPlugin.cutoutConfig.maxHeightPercent
Specifies the maximum height of the cutout in percent.
If the cutout width is set to a 100% of the screen width, will not be visible on the respective sides, since it covers 100% of the screen.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
1% - 100% |
Percent | String | 100% |
✗ |
Why width, maxWidth and maxHeight but no height?
The form of the cutout can be defined by the ratio, so there is no direct need for width AND height parameter. But if there is only one width parameter where % or pixel value is allowed, it is not possible to limit the height to a certain percentage. That limits the usability in landscape mode quite a bit.
viewPlugin.cutoutConfig.ratioFromSize
Defines the ratio of the cutout.
These parameters, together with viewPlugin.cutoutConfig.width or viewPlugin.cutoutConfig.maxWidthPercent set, define the full size of the cutout.
viewPlugin.cutoutConfig.ratioFromSize.width
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | Pixel | Integer | - | ✗ |
viewPlugin.cutoutConfig.ratioFromSize.height
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | Pixel | Integer | - | ✗ |
viewPlugin.cutoutConfig.alignment
Specifies where in the preview the cutout will be positioned.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
see below | - | String | center |
✗ |
Value | Description |
---|---|
top |
The cutout is placed at the top border of the view |
top_half |
The cutout is placed in the top half of the view |
center |
The cutout is centered in the view vertically and horizontally |
bottom |
The cutout is placed at lower border of the cutout is at the lower border of the view |
bottom_half |
The cutout is placed at the same as top half just from below: offsetY = (viewHeight - cutoutHeight) / 3 * 2 |
viewPlugin.cutoutConfig.offset
Moves the cutout in x and y direction by the specified pixel value. Put negative values to move left or up, positive values to move right or down. The offset is limited to move the cutout to the start/end of the view.
viewPlugin.cutoutConfig.offset.x
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | Pixel | Integer | 0 | ✗ |
viewPlugin.cutoutConfig.offset.y
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | Pixel | Integer | 0 | ✗ |
viewPlugin.cutoutConfig.outerColor
Specifies the color of the area outside of the cutout.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
000000 - FFFFFF |
Hex-RGB | String | TRANSPARENT |
✗ |
viewPlugin.cutoutConfig.outerAlpha
Defines the alpha value for the color outside of the cutout.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
0.0 - 1.0 |
- | Float | 0.0 |
✗ |
viewPlugin.cutoutConfig.strokeColor
Defines the color of the cutout overlay stroke if viewPlugin.cutoutConfig.style is set to rect
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
00000000 - FFFFFFFF |
Hex-ARGB | String | FFFFFF |
✗ |
viewPlugin.cutoutConfig.strokeWidth
Sets the stroke width of the cutout overlay stroke if `cutoutConfig.style`_ is set to rect
.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | dp / Pixel | Integer | 2 | ✗ |
Android
This parameters Unit is density-independent pixel (dp)
iOS
This parameters Unit is pixel
viewPlugin.cutoutConfig.cornerRadius
Sets the corner radius of the cutout overlay if viewPlugin.cutoutConfig.style is set to rect
.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | dp / Pixel | Integer | 8 | ✗ |
Android
This parameters Unit is density-independent pixel (dp)
iOS
This parameters Unit is pixel
viewPlugin.cutoutConfig.cropPadding
Adds an inside padding to the crop of the image, relative to the cutout size. If not set, the crop size correspond to the cutout size.
The values are subtracted on both sides of the cutout:
cropWidth = cutoutWidth - 2 * cropPadding.x
viewPlugin.cutoutConfig.cropPadding.x
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | Pixel | Integer | 0 | ✗ |
viewPlugin.cutoutConfig.cropPadding.y
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | Pixel | Integer | 0 | ✗ |
Warning
This should only be used in combination with a fixed viewPlugin.cutoutConfig.width
Tip: Enlarge the crop size
Setting a negative value enlarges the crop area.
viewPlugin.cutoutConfig.cropOffset
Moves the crop area to the left and up (negative values) or to the right and down (positive value), relative to the cutout position.
viewPlugin.cutoutConfig.cropOffset.x
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | Pixel | Integer | 0 | ✗ |
viewPlugin.cutoutConfig.cropOffset.y
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | Pixel | Integer | 0 | ✗ |
Warning
This should only be used in combination with a fixed viewPlugin.cutoutConfig.width
viewPlugin.cutoutConfig.animation
New in version 8.
Value | Description |
---|---|
none |
No Animation |
zoom |
The cutout will zoom in/out when appearing/disappearing |
fade |
The cutout will fade in/out when appearing/disappearing |
viewPlugin.cancelOnResult
Specifies if the scanning process should stop once a result is found and returned.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
true or false |
boolean | boolean | true |
✗ |
viewPlugin.delayStartScanTime
New in version 10.
On Start
The delay (including the animation) will be triggered every time Anyline has been started.
If this value is set, the scan process will not return a result until the set time has elapsed. The delayStartScanTime will be set in milliseconds.
Additionally to the delay, this will introduce an animation for the duration of the delay.
Value | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
This Value will set a delay time in milliseconds (ms) | int | int | 0 |
viewPlugin.scanFeedback
This parameters define the behaviour of the scan feedback presented to the user in the cutout.
The feedback is used to present the detected symbols back to the user, which helps to improve the scanning experience and to ensure a correct positioning of the camera
viewPlugin.scanFeedback.style
Defines the style of visual user feedback to be used
Android
For reasons of backward compatibility, this configuration correlates with the onTextOutlineDetected
callback:
- If the callback returns
true
and no visual feedback was defined in the config, nothing will be drawn. - If the callback returns
true
and a visualFeedback is defined, the feedback will be drawn anyways, since the feedback config was explicitly added. - If the callback returns
false
and there is no visual feedback config, the standardRECT
will be drawn. - If the callback returns
false
and there is a feedback config defined, the specified config will be drawn.
viewPlugin.scanFeedback.strokeColor
Defines the color that is used to draw the visual feedback
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
00000000 - FFFFFFFF |
Hex-ARGB | String | AA0099FF |
✗ |
viewPlugin.scanFeedback.strokeWidth
Sets the stroke width used to draw the visual feedback
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | dp / Pixel | Integer | 2 | ✗ |
Android
This parameters Unit is density-independent pixel (dp)
iOS
This parameters Unit is pixel
viewPlugin.scanFeedback.fillColor
This defines the color the rectangle is filled with in RECT
and CONTOUR_RECT
`scanFeedback.style`_ mode. This setting is ignored for styles CONTOUR_POINT
and CONTOUR_UNDERLINE
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
00000000 - FFFFFFFF |
Hex-ARGB | String | TRANSPARENT |
✗ |
viewPlugin.scanFeedback.cornerRadius
Defines the corner radius of the rect in viewPlugin.scanFeedback.style RECT
. This setting will be ignored for all other feedback styles
Android
This parameters Unit is density-independent pixel (dp)
iOS
This parameters Unit is pixel
viewPlugin.scanFeedback.animation
iOS
As of version 42.3.0, this parameter is only implemented for Android
Adds animations to the visual feedback. This is only valid for `scanFeedback.style`_ CONTOUR_POINT
and CONTOUR_UNDERLINE
.
For other styles, this parameter is ignored, and a default default animation is presented.
Value | CONTOUR_POINT |
CONTOUR_UNDERLINE |
---|---|---|
TRAVERSE_SINGLE |
||
TRAVERSE_MULTI |
||
KITT |
||
BLINK |
||
RESIZE |
||
PULSE |
||
PULSE_RANDOM |
Android Camera API 2 & Animation
On Android devices using the Android Camera API 2, adding an animation to the visual feedback may result in performance issues. See Camera API 2 and Visual Feedback Animations for more details.
default animation
If no `scanFeedback.animation`_ is specified, the following default animations are used.
Value | Description | Example |
---|---|---|
RECT |
The rect is animated from the cutout to the found text area within the specified animation time |
|
CONTOUR_RECT |
No animation. The found contour rects are drawn when found. The animation time specifies how often new contour rects are drawn. In this case the new found rects are only drawn every 100ms |
|
CONTOUR_POINT |
No animation. The contour points are drawn as soon as contours are found. The animation time specifies how often new contour points are drawn. In this case the new points are only drawn every 100ms |
|
CONTOUR_UNDERLINE |
No animation. The contours underlines are drawn as soon as contours are found. The animation time specifies how often new contour underlines are drawn. In this case the new underlines are only drawn every 100ms |
The example below shows a visualFeedback config for different styles and animations. Change the style/animation parameter to get the different results shown above.
"scanFeedback": {
"animation": "pulse",
"style": "contour_point",
"animationDuration": 300,
"strokeColor": "0099FF",
"strokeWidth": 2
}
viewPlugin.scanFeedback.animationDuration
Defines the duration of the animation when a rect is animated to the next detected rect. This is only used in viewPlugin.scanFeedback.style RECT
.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | ms | Integer | 75 | ✗ |
viewPlugin.scanFeedback.redrawTimeout
Deprecated since version 3.6: Use `scanFeedback.animationDuration`_ (with no viewPlugin.scanFeedback.animation specified) instead
Defines the timeout between redrawing the updated visual feedback. This is only used in style viewPlugin.scanFeedback.style CONTOUR_RECT
, CONTOUR_UNDERLINE
and CONTOUR_POINT
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
- | ms | Integer | 0 | ✗ |
viewPlugin.scanFeedback.beepOnResult
Defines if a beep sound should be played by the SDK when a result is found.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
true or false |
boolean | boolean | false |
✗ |
viewPlugin.scanFeedback.vibrateOnResult
Defines if a vibration should be triggered by the SDK when a result is found.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
true or false |
boolean | boolean | false |
✗ |
viewPlugin.scanFeedback.blinkAnimationOnResult
Defines if the display should flash shortly when a result is found.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
true or false |
boolean | boolean | true |
✗ |
viewPlugin.plugin.enableFullFrameScanning
Warning
This attribute is currently only available for BarcodeScanPlugin.
If full frame scanning is enabled, the whole preview size of the image will be used for scanning.
Otherwise only the section of the preview enclosed by the cutout (defined in viewPlugin.cutoutConfig
) is used for scanning.
Range | Unit | JSON-Type | Default | Mandatory |
---|---|---|---|---|
true or false |
boolean | boolean | false |
✗ |