public class ScanbotSDKInitializer
Initializes Scanbot SDK library. Use it to set up desired components and then call .initialize. Can be initialized only once.
public ScanbotSDKInitializer()
Initializes Scanbot SDK library. Use it to set up desired components and then call .initialize. Can be initialized only once.
protected boolean getUseLog()
protected void setUseLog(boolean p)
@Nullable protected io.scanbot.sdk.util.log.Logger getLogger()
protected void setLogger(@Nullable
io.scanbot.sdk.util.log.Logger p)
@NotNull public ScanbotSDKInitializer withLogging(boolean useLog)
Enables or disables logs in Scanbot SDK.
Logs are printed into LogCat as well as saved on the device. You can find them in Environment.getExternalStorageDirectory/debug_logs/package_name. Usually it is /sdcard/debug_logs/package_name
By default all logs are disabled. If you're using logging, consider switching it off for production builds for security and performance reasons.
This method must be called before .initialize, so it is possible to change logging settings before initializing the SDK.
useLog - true to enable loggingfalse to disable loggingclass ScanbotSDKInitializer, so calls can be chained@NotNull public ScanbotSDKInitializer license(@NotNull android.app.Application application, @NotNull java.lang.String license)
Set Scanbot SDK license
@NotNull public ScanbotSDKInitializer licenceErrorHandler(@NotNull io.scanbot.sap.IScanbotSDKLicenseErrorHandler licenseErrorHandler)
Register callback for handling all sdk license errors after sdk initialisation
@NotNull public ScanbotSDKInitializer ocrBlobsPath(@NotNull android.app.Application application, @NotNull java.lang.String ocrBlobsPath)
Set Scanbot SDK OCR blobs path
@NotNull public ScanbotSDKInitializer prepareOCRLanguagesBlobs(boolean prepareOCRLanguagesBlobs)
Set Scanbot SDK to prepare OCR languages blobs. Prepares language train data blobs for io.scanbot.sdk.dcscanner.DCScanner and io.scanbot.sdk.hicscanner.HealthInsuranceCardScanner
@NotNull public ScanbotSDKInitializer prepareBlurEstimatorBlobs(boolean prepareBlurEstimatorBlobs)
Set Scanbot SDK to prepare io.scanbot.sdk.process.BlurEstimator blobs.
@NotNull public ScanbotSDKInitializer useOcrSettings(@NotNull io.scanbot.sdk.ocr.intelligence.OcrSettings ocrSettings)
Set Scanbot SDK to use given OCR settings
@NotNull public ScanbotSDKInitializer prepareMRZBlobs(boolean prepareMRZBlobs)
Set Scanbot SDK to prepare MRZ scanner blobs
@NotNull public ScanbotSDKInitializer prepareChequeBlobs(boolean prepareChequeBlobs)
Set Scanbot SDK to prepare Cheque scanner blobs
@NotNull public ScanbotSDKInitializer preparePayFormBlobs(boolean preparePayFormBlobs)
Set Scanbot SDK to prepare PayForm scanner blobs
@NotNull public ScanbotSDKInitializer prepareFilterPredictionBlobs(boolean prepareFilterPredictionBlobs)
Set Scanbot SDK to prepare Filter prediction blobs
@NotNull public ScanbotSDKInitializer contourDetectorType(@NotNull io.scanbot.sdk.core.contourdetector.ContourDetector.Type type)
Set Scanbot SDK to use the specified io.scanbot.sdk.core.contourdetector.ContourDetector.Type
Default is io.scanbot.sdk.core.contourdetector.ContourDetector.Type.ML_BASED.
Use io.scanbot.sdk.ScanbotSDK.contourDetector to get an instance of io.scanbot.sdk.core.contourdetector.ContourDetector
@NotNull public ScanbotSDKInitializer imageProcessorType(@NotNull io.scanbot.sdk.process.ImageProcessor.Type type)
Set Scanbot SDK to use the specified io.scanbot.sdk.process.ImageProcessor.Type
Default is io.scanbot.sdk.process.ImageProcessor.Type.BASE.
Use io.scanbot.sdk.ScanbotSDK.imageProcessor to get an instance of io.scanbot.sdk.process.ImageProcessor
io.scanbot.sdk.ScanbotSDK.imageProcessor@NotNull public ScanbotSDKInitializer useFileEncryption(boolean enableFileEncryption, @Nullable io.scanbot.sdk.persistence.fileio.FileIOProcessor fileIOProcessor)
Sets a global Scanbot SDK flag which enables/disables a usage of encrypted file IO processor for all image and pdf files. By default - false.
@NotNull
public io.scanbot.sap.SdkLicenseInfo initialize(@NotNull
android.app.Application application)
Initializes Scanbot SDK library
@NotNull public ScanbotSDKInitializer documentDraftExtractor(@NotNull io.scanbot.sdk.docprocessing.draft.DocumentDraftExtractor extractor)
Adjust this parameter to specify snapped pages should be combined into documents and in which format
extractor - algorithm to extract array of io.scanbot.sdk.entity.DocumentDraftfrom io.scanbot.sdk.entity.SnappingDraftclass ScanbotSDKInitializer@NotNull public ScanbotSDKInitializer sdkFilesDirectory(@NotNull android.app.Application application, @NotNull java.io.File sdkFilesDirectory)
Set the custom directory for pages and documents storage
@NotNull public ScanbotSDKInitializer logger(@NotNull io.scanbot.sdk.util.log.Logger logger)
Adjust this parameter to specify which Logger should be used.
To set a custom logger ScanbotSDKInitializer.withLogging must be set to true
logger - implementation of Loggerclass ScanbotSDKInitializerScanbotSDKInitializer.withLogging@NotNull public ScanbotSDKInitializer usePageStorageSettings(@NotNull io.scanbot.sdk.persistence.PageStorageSettings pageStorageSettings)
Adjust this parameter to specify which io.scanbot.sdk.persistence.PageStorageSettings should be used.
class ScanbotSDKInitializer@JvmStatic public static boolean isInitialized()