public class GenericDocumentRecognizerConfiguration
Class which is used to configure io.scanbot.sdk.ui.view.genericdocument.GenericDocumentRecognizerActivity Contains settings indicating views Behaviour, Texts and Appearance
public GenericDocumentRecognizerConfiguration()
Class which is used to configure io.scanbot.sdk.ui.view.genericdocument.GenericDocumentRecognizerActivity Contains settings indicating views Behaviour, Texts and Appearance
@NotNull public java.util.Map<java.lang.String,java.io.Serializable> getGenericDocumentConfiguration()
public void setFlashEnabled(boolean flashEnabled)
Controls whether the flash should be initially enabled. The default value is FALSE.
public void setOrientationLockMode(@NotNull
io.scanbot.sdk.ui.view.base.configuration.CameraOrientationMode cameraOrientationMode)
Orientation lock mode of the camera: PORTRAIT or LANDSCAPE. By default the camera orientation is not locked.
public void setCameraModule(@NotNull
io.scanbot.sdk.camera.CameraModule cameraModule)
Set supported camera module: CameraModule.BACK, CameraModule.FRONT or others. Optional. By default is CameraModule.BACK.
public void setTopBarBackgroundColor(@ColorInt
int topBarBackgroundColor)
Background color of the top toolbar.
public void setTopBarButtonsColor(@ColorInt
int topBarButtonsColor)
Color of the titles of all buttons in the top toolbar.
public void setTopBarButtonsInactiveColor(@ColorInt
int topBarButtonsInactiveColor)
Color of the titles of all buttons in the top toolbar.
public void setCameraOverlayColor(@ColorInt
int cameraOverlayColor)
Background color outside of the finder window.
public void setFinderLineWidth(int finderLineWidth)
Thickness of the finder window's outline.
public void setFinderLineColor(@ColorInt
int finderLineColor)
Color of the finder window's outline.
public void setCancelButtonTitle(@NotNull
java.lang.String cancelButtonTitle)
Title of the cancel button.
public void setEnableCameraExplanationText(@NotNull
java.lang.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.
public void setEnableCameraButtonTitle(@NotNull
java.lang.String enableCameraButtonTitle)
Title of the button that opens the screen where the user can allow the usage of the camera by the app.
public void setClearButtonTitle(@NotNull
java.lang.String clearButtonTitle)
Text of the button which clears the list of scanned fields.
public void setSubmitButtonTitle(@NotNull
java.lang.String submitButtonTitle)
Text of the button which finishes the flow
public void setDetailsBackgroundColor(@ColorInt
int color)
The color of bottom sheet
public void setDetailsPrimaryColor(@ColorInt
int color)
The color of text elements in bottom sheet
public void setDetailsActionColor(@ColorInt
int color)
The color of Submit button
public void setFieldsCountTextColor(@ColorInt
int color)
Text color of the fields count label.
public void setFieldConfidenceHighColor(@ColorInt
int color)
Color of confidence value label background in details screen, when the field confidence level is high.
public void setFieldConfidenceModerateColor(@ColorInt
int color)
Color of confidence value label background in details screen, when the field confidence level is moderate.
public void setFieldConfidenceLowColor(@ColorInt
int color)
Color of confidence value label background in details screen, when the field confidence level is low.
public void setFieldConfidenceTextColor(@ColorInt
int color)
Color of confidence value label text in details.
public void setTipTextColor(@ColorInt
int color)
Color of tip text on scanning screen.
public void setTipBackgroundColor(@ColorInt
int color)
Color of tip background on scanning screen.
public void setFieldsCountText(@NotNull
java.lang.String text)
String used for displaying amount of detected fields. Use %d for number formatting symbol.
public void setConfidenceValue(@NotNull
java.lang.String text)
String that shows average confidence value of scanned document. Use %d as number formatting symbol.
public void setScanBackSideTitle(@NotNull
java.lang.String text)
String that asks user to scan back side of a document.
public void setScanFrontSideTitle(@NotNull
java.lang.String text)
String that asks user to scan front side of a document.
public void setStartScanningTitle(@NotNull
java.lang.String text)
String that asks user to start scanning a document.
public void setScannedEverythingTitle(@NotNull
java.lang.String text)
String that notifies that both sides of document are scanned.
public void setImageTitle(@NotNull
java.lang.String text)
A title to show image content.
public void setNoDataTitle(@NotNull
java.lang.String text)
String that notifies that nothing was scanned yet.
public void setShouldSavePhotoImageInStorage(boolean shouldSave)
Defines, if photo image should be stored in internal storage on disk.
public void setShouldSaveSignatureImageInStorage(boolean shouldSave)
Defines, if signature image should be stored in internal storage on disk.
public void setAcceptedDocumentTypes(@NotNull
java.util.ArrayList<io.scanbot.genericdocument.entity.RootDocumentType> documentTypes)
Accepted document types. All other document types will be ignored.
By default - RootDocumentType.ALL_TYPES
public void setSharpnessAcceptanceFactor(float sharpnessAcceptanceFactor)
Accepted minimal sharpness score. Images with a score less than that will be rejected with RecognitionStatus::ErrorTooBlurry.
Default is 80
0 - any image will be accepted. 80 - a good compromise; the recommended setting. 100 - only very sharp images will be accepted.
public void setUseButtonsAllCaps(boolean allCaps)
Controls whether buttons should use all capitals style
public void setFieldsDisplayConfiguration(@NotNull
java.util.HashMap<java.lang.String,io.scanbot.genericdocument.entity.FieldProperties> configuration)
Allows to configure the display configuration for fields.
Usage: The map of the normalized field name (can be taken from io.scanbot.genericdocument.entity.DePassport.NormalizedFieldNames, io.scanbot.genericdocument.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 ) )
public void setDocumentDisplayConfiguration(@NotNull
java.util.HashMap<java.lang.String,io.scanbot.genericdocument.entity.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.genericdocument.entity.DeDriverLicenseBack.Categories.DOCUMENT_NORMALIZED_TYPE, io.scanbot.genericdocument.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)), )