Class DocumentDataExtractorConfiguration
-
- All Implemented Interfaces:
public final class DocumentDataExtractorConfigurationClass which is used to configure io.scanbot.sdk.ui.view.documentdata.DocumentDataExtractorActivity Contains settings indicating views Behaviour, Texts and Appearance
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDocumentDataExtractorConfiguration.Companion
-
Field Summary
Fields Modifier and Type Field Description private final DocumentDataExtractorScreenJsonConfigurationparamsprivate final DocumentDataExtractorNativeConfigurationnativeParamspublic final static DocumentDataExtractorConfiguration.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description DocumentDataExtractorConfiguration()
-
Method Summary
Modifier and Type Method Description final DocumentDataExtractorScreenJsonConfigurationgetParams()final DocumentDataExtractorNativeConfigurationgetNativeParams()final UnitsetFlashEnabled(Boolean flashEnabled)Controls whether the flash should be initially enabled. final UnitsetOrientationLockMode(CameraOrientationMode cameraOrientationMode)Orientation lock mode of the camera: PORTRAIT or LANDSCAPE. final UnitsetCameraModule(CameraModule cameraModule)Set supported camera module: CameraModule.BACK, CameraModule.FRONT or others. final UnitsetCameraPreviewMode(CameraPreviewMode cameraPreviewMode)Preview mode of the camera: Fit-In or Fill-In. final UnitsetTopBarBackgroundColor(Integer topBarBackgroundColor)Background color of the top toolbar. final UnitsetTopBarButtonsColor(Integer topBarButtonsColor)Color of the titles of all buttons in the top toolbar. final UnitsetTopBarButtonsInactiveColor(Integer topBarButtonsInactiveColor)Color of the titles of all buttons in the top toolbar. final UnitsetCameraOverlayColor(Integer cameraOverlayColor)Background color outside of the finder window. final UnitsetFinderLineWidth(Integer finderLineWidth)Thickness of the finder window's outline in Px. final UnitsetFinderLineColor(Integer finderLineColor)Color of the finder window's outline. final UnitsetCancelButtonTitle(String cancelButtonTitle)Title of the cancel button. final UnitsetCancelButtonIcon(Integer cancelButtonIcon)Icon of the cancel button. final UnitsetEnableCameraExplanationText(String enableCameraExplanationText)Text that will be displayed when the app is not allowed to use the camera, prompting the user to enable the usage of the camera. final UnitsetEnableCameraButtonTitle(String enableCameraButtonTitle)Title of the button that opens the screen where the user can allow the usage of the camera by the app. final UnitsetClearButtonTitle(String clearButtonTitle)Text of the button which clears the list of scanned fields. final UnitsetSubmitButtonTitle(String submitButtonTitle)Text of the button which finishes the flow final UnitsetDetailsBackgroundColor(Integer color)The color of bottom sheet final UnitsetDetailsPrimaryColor(Integer color)The color of text elements in bottom sheet final UnitsetDetailsActionColor(Integer color)The color of Clear and Submit buttons final UnitsetFieldsCountTextColor(Integer color)Text color of the fields count label. final UnitsetFieldConfidenceHighColor(Integer color)Color of confidence value label background in details screen, when the field confidence level is high. final UnitsetFieldConfidenceModerateColor(Integer color)Color of confidence value label background in details screen, when the field confidence level is moderate. final UnitsetFieldConfidenceLowColor(Integer color)Color of confidence value label background in details screen, when the field confidence level is low. final UnitsetFieldConfidenceTextColor(Integer color)Color of confidence value label text in details. final UnitsetTipTextColor(Integer color)Color of tip text on scanning screen. final UnitsetTipBackgroundColor(Integer color)Color of tip background on scanning screen. final UnitsetFieldsCountText(String text)String used for displaying amount of detected fields. final UnitsetConfidenceValue(String text)String that shows average confidence value of scanned document. final UnitsetScanBackSideTitle(String text)String that asks user to scan back side of a document. final UnitsetScanFrontSideTitle(String text)String that asks user to scan front side of a document. final UnitsetStartScanningTitle(String text)String that asks user to start scanning a document. final UnitsetScannedEverythingTitle(String text)String that notifies that both sides of document are scanned. final UnitsetImageTitle(String text)A title to show image content. final UnitsetNoDataTitle(String text)String that notifies that nothing was scanned yet. final UnitsetAcceptedDocumentTypes(ArrayList<RootDocumentType> documentTypes)Accepted document types. final UnitsetUseButtonsAllCaps(Boolean allCaps)Controls whether buttons should use all capitals style final UnitsetFieldsDisplayConfiguration(HashMap<String, FieldProperties> configuration)Allows to configure the display configuration for fields. final UnitsetDocumentDisplayConfiguration(HashMap<String, DocumentProperties> configuration)Allows to configure the display configuration for documents. final UnitsetExcludedFieldTypes(HashSet<String> excludedFields)Set of secure fields which should be excluded from scanning process. final UnitsetTouchToFocusEnabled(Boolean enabled)Controls whether the touch to focus feature should be enabled. -
-
Method Detail
-
getParams
final DocumentDataExtractorScreenJsonConfiguration getParams()
-
getNativeParams
final DocumentDataExtractorNativeConfiguration getNativeParams()
-
setFlashEnabled
final Unit setFlashEnabled(Boolean flashEnabled)
Controls whether the flash should be initially enabled. The default value is FALSE.
-
setOrientationLockMode
final Unit setOrientationLockMode(CameraOrientationMode cameraOrientationMode)
Orientation lock mode of the camera: PORTRAIT or LANDSCAPE. By default the camera orientation is not locked.
-
setCameraModule
final Unit setCameraModule(CameraModule cameraModule)
Set supported camera module: CameraModule.BACK, CameraModule.FRONT or others. Optional. By default is CameraModule.BACK.
-
setCameraPreviewMode
final Unit setCameraPreviewMode(CameraPreviewMode cameraPreviewMode)
Preview mode of the camera: Fit-In or Fill-In. Optional, default is Fill-In.
-
setTopBarBackgroundColor
final Unit setTopBarBackgroundColor(Integer topBarBackgroundColor)
Background color of the top toolbar.
-
setTopBarButtonsColor
final Unit setTopBarButtonsColor(Integer topBarButtonsColor)
Color of the titles of all buttons in the top toolbar.
-
setTopBarButtonsInactiveColor
final Unit setTopBarButtonsInactiveColor(Integer topBarButtonsInactiveColor)
Color of the titles of all buttons in the top toolbar.
-
setCameraOverlayColor
final Unit setCameraOverlayColor(Integer cameraOverlayColor)
Background color outside of the finder window.
-
setFinderLineWidth
final Unit setFinderLineWidth(Integer finderLineWidth)
Thickness of the finder window's outline in Px.
-
setFinderLineColor
final Unit setFinderLineColor(Integer finderLineColor)
Color of the finder window's outline.
-
setCancelButtonTitle
final Unit setCancelButtonTitle(String cancelButtonTitle)
Title of the cancel button.
-
setCancelButtonIcon
final Unit setCancelButtonIcon(Integer cancelButtonIcon)
Icon of the cancel button.
-
setEnableCameraExplanationText
final Unit setEnableCameraExplanationText(String enableCameraExplanationText)
Text that will be displayed when the app is not allowed to use the camera, prompting the user to enable the usage of the camera.
-
setEnableCameraButtonTitle
final Unit setEnableCameraButtonTitle(String enableCameraButtonTitle)
Title of the button that opens the screen where the user can allow the usage of the camera by the app.
-
setClearButtonTitle
final Unit setClearButtonTitle(String clearButtonTitle)
Text of the button which clears the list of scanned fields.
-
setSubmitButtonTitle
final Unit setSubmitButtonTitle(String submitButtonTitle)
Text of the button which finishes the flow
-
setDetailsBackgroundColor
final Unit setDetailsBackgroundColor(Integer color)
The color of bottom sheet
-
setDetailsPrimaryColor
final Unit setDetailsPrimaryColor(Integer color)
The color of text elements in bottom sheet
-
setDetailsActionColor
final Unit setDetailsActionColor(Integer color)
The color of Clear and Submit buttons
-
setFieldsCountTextColor
final Unit setFieldsCountTextColor(Integer color)
Text color of the fields count label.
-
setFieldConfidenceHighColor
final Unit setFieldConfidenceHighColor(Integer color)
Color of confidence value label background in details screen, when the field confidence level is high.
-
setFieldConfidenceModerateColor
final Unit setFieldConfidenceModerateColor(Integer color)
Color of confidence value label background in details screen, when the field confidence level is moderate.
-
setFieldConfidenceLowColor
final Unit setFieldConfidenceLowColor(Integer color)
Color of confidence value label background in details screen, when the field confidence level is low.
-
setFieldConfidenceTextColor
final Unit setFieldConfidenceTextColor(Integer color)
Color of confidence value label text in details.
-
setTipTextColor
final Unit setTipTextColor(Integer color)
Color of tip text on scanning screen.
-
setTipBackgroundColor
final Unit setTipBackgroundColor(Integer color)
Color of tip background on scanning screen.
-
setFieldsCountText
final Unit setFieldsCountText(String text)
String used for displaying amount of detected fields. Use %d for number formatting symbol.
-
setConfidenceValue
final Unit setConfidenceValue(String text)
String that shows average confidence value of scanned document. Use %d as number formatting symbol.
-
setScanBackSideTitle
final Unit setScanBackSideTitle(String text)
String that asks user to scan back side of a document.
-
setScanFrontSideTitle
final Unit setScanFrontSideTitle(String text)
String that asks user to scan front side of a document.
-
setStartScanningTitle
final Unit setStartScanningTitle(String text)
String that asks user to start scanning a document.
-
setScannedEverythingTitle
final Unit setScannedEverythingTitle(String text)
String that notifies that both sides of document are scanned.
-
setImageTitle
final Unit setImageTitle(String text)
A title to show image content.
-
setNoDataTitle
final Unit setNoDataTitle(String text)
String that notifies that nothing was scanned yet.
-
setAcceptedDocumentTypes
final Unit setAcceptedDocumentTypes(ArrayList<RootDocumentType> documentTypes)
Accepted document types. All other document types will be ignored.
-
setUseButtonsAllCaps
final Unit setUseButtonsAllCaps(Boolean allCaps)
Controls whether buttons should use all capitals style
-
setFieldsDisplayConfiguration
final Unit setFieldsDisplayConfiguration(HashMap<String, FieldProperties> configuration)
Allows to configure the display configuration for fields.
Usage: The map of the normalized field name (can be taken from io.scanbot.documentdata.entity.DePassport.NormalizedFieldNames, io.scanbot.documentdata.entity.DeIdCardBack.NormalizedFieldNames, etc.) to FieldProperties object (display name and visibility) is expected.
hashMapOf( DePassport.NormalizedFieldNames.PHOTO to FieldProperties( context.getString(R.string.photo_display_name), FieldProperties.DisplayState.AlwaysVisible ), MRZ.NormalizedFieldNames.CHECK_DIGIT to FieldProperties( context.getString(R.string.check_digit_display_name), FieldProperties.DisplayState.AlwaysVisible ) )
-
setDocumentDisplayConfiguration
final Unit setDocumentDisplayConfiguration(HashMap<String, DocumentProperties> configuration)
Allows to configure the display configuration for documents.
Usage: The map of the normalized document name (can be taken from document name, for example io.scanbot.documentdata.entity.DeDriverLicenseBack.Categories.DOCUMENT_NORMALIZED_TYPE, io.scanbot.documentdata.entity.DeDriverLicenseBack.Categories.A.DOCUMENT_NORMALIZED_TYPE, etc.) to DocumentProperties object is expected.
hashMapOf( DeDriverLicenseBack.Categories.DOCUMENT_NORMALIZED_TYPE to DocumentProperties(context.getString(R.string.category_display_name)), DeDriverLicenseBack.Categories.A.DOCUMENT_NORMALIZED_TYPE to DocumentProperties(context.getString(R.string.category_A_display_name)), )
-
setExcludedFieldTypes
final Unit setExcludedFieldTypes(HashSet<String> excludedFields)
Set of secure fields which should be excluded from scanning process. All other fields will be scanned as usual. Field should be set ONLY as normalized field name. Example: DePassport.NormalizedFieldNames.NATIONALITY or DeIdCardBack.NormalizedFieldNames.HEIGHT
By default - empty and all fields are scanned
-
setTouchToFocusEnabled
final Unit setTouchToFocusEnabled(Boolean enabled)
Controls whether the touch to focus feature should be enabled. Default is
true.
-
-
-
-