Table of contents

MRZScannerConfig

MRZScannerConfig is the class that defines the configurations for MRZ scanning. It is set via the input value of MRZScannerActivity.ResultContract

Definition

Assembly: DynamsoftMRZScanner.aar

Namespace: com.dynamsoft.mrzscanner.ui

final class MRZScannerConfig

Methods

Method Description
setLicense Sets the license string.
setTemplateFile Sets the template with a file path or a JSON string.
setTorchButtonVisible Sets whether to display the torch button when scanning.
setBeepEnabled Sets whether the beep sound is triggered or not when a MRZ is scanned.
setVibrateEnabled Sets whether the vibration is triggered or not when a MRZ is scanned.
setCloseButtonVisible Sets the visibility status of the close button for users to close the scanner page.
setDocumentType Sets the type of document to scan, such as ID cards or passports.
getLicense Returns the license string.
getTemplateFile Returns the template with a file path or a JSON string.
isTorchButtonVisible Returns the visibility status of the torch button.
isBeepEnabled Returns the play status of the beep sound when a MRZ is scanned.
isVibrateEnabled Returns the play status of the vibration when a MRZ is scanned.
isCloseButtonVisible Returns the visibility status of the close button.
getDocumentType Returns the type of document to scan, such as ID cards or passports.
isGuideFrameVisible Returns the visibility status of the guide frame on the display.
setGuideFrameVisible Sets the visibility of the guide frame on the display.

The following methods are deprecated:

Method Description
setTemplateFilePath Sets the local file path for the JSON parameters template file.
getTemplateFilePath Returns the local path of the settings template file.

setLicense

Set the license.

void setLicense(String license);

Parameter(s)

license: The license key to be used for initialization.

setTemplateFile

Sets the template with a file path or a JSON string.

void setTemplateFile(String templateFile);

Parameter(s)

templateFile: The file path or a JSON string.

setTorchButtonVisible

Sets whether to display the torch button when scanning. Users can click the torch button to turn on/off the torch.

void setTorchButtonVisible(boolean torchButtonVisible);

Parameter(s)

torchButtonVisible: A boolean value that determines whether to display the torch button.

setBeepEnabled

Sets whether the beep sound is triggered or not when a MRZ is scanned.

void setBeepEnabled(boolean beepEnabled);

Parameter(s)

beepEnabled: A boolean value that determines whether to enable the beep sound.

setVibrateEnabled

Sets whether the vibration is triggered or not when a MRZ is scanned.

void setVibrateEnabled(boolean vibrateEnabled);

Parameter(s)

vibrateEnabled: A boolean value that determines whether to enable the vibration.

setCloseButtonVisible

Sets the visibility status of the close button for users to close the scanner page.

void setCloseButtonVisible(boolean closeButtonVisible);

Parameter(s)

closeButtonVisible: A boolean value that determines whether to display the close button.

setDocumentType

Sets the type of document to scan, such as ID cards or passports.

void setDocumentType(EnumDocumentType type);

Parameter(s)

type: The type of document to scan, such as ID cards or passports.

getLicense

Returns the license string.

String getLicense();

Return Value

The license key to be used for initialization.

getTemplateFile

Returns the template with a file path or a JSON string.

String getTemplateFile();

Return Value

A file path or a JSON string.

isTorchButtonVisible

Returns whether the button is visible.

boolean isTorchButtonVisible();

Return Value

A boolean value that determines whether the torch button is displayed.

isBeepEnabled

Returns whether the beep sound is enabled.

boolean isBeepEnabled();

Return Value

A boolean value that determines whether the beep sound is enabled.

isVibrateEnabled

Returns whether the vibration is enabled.

boolean isVibrateEnabled();

Return Value

A boolean value that determines whether the vibration is enabled.

isCloseButtonVisible

Returns whether the close button is visible.

boolean isCloseButtonVisible();

Return Value

A boolean value that determines whether the close button is displayed.

getDocumentType

Returns the type of document to scan, such as ID cards or passports.

EnumDocumentType getDocumentType();

Return Value

The type of document to scan, such as ID cards or passports.

isGuideFrameVisible

Returns the visibility status of the guide frame on the display.

boolean isGuideFrameVisible();

Return Value

A boolean value that determines whether the guide frame is displayed.

setGuideFrameVisible

Set whether to display the guide frame.

void setGuideFrameVisible(boolean guideFrameVisible);

Parameter(s)

guideFrameVisible: A boolean value that determines whether to display the guide frame.

setTemplateFilePath

Set a path for the SDK to load template file.

void setTemplateFilePath(String templateFilePath);

Parameter(s)

templateFilePath: The path of the JSON template file.

getTemplateFilePath

Returns the local path of the settings template file.

String getTemplateFilePath();

Return Value

The path of the JSON template file.

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: