public class ScanbotSDK
Provider for Scanbot SDK features.
Typical use case is to create this object in Activity.onCreate or Service.onCreate, but it's allowed to create it during any other point of lifecycle before onDestroy.
Note that each instance stores reference to given context, so it should not be cached statically.
All necessary caching is already done by class ScanbotSDK itself - some methods might return
same instance repeatedly.
Some insight - Scanbot uses Dependency Injection internally, but we do not want to expose it to users of the library to ensure that changes in DI implementation won't affect users of the library.
class ScanbotSDKpublic ScanbotSDK(@NotNull
android.content.Context context)
Provider for Scanbot SDK features.
Typical use case is to create this object in Activity.onCreate or Service.onCreate, but it's allowed to create it during any other point of lifecycle before onDestroy.
Note that each instance stores reference to given context, so it should not be cached statically.
All necessary caching is already done by class ScanbotSDK itself - some methods might return
same instance repeatedly.
Some insight - Scanbot uses Dependency Injection internally, but we do not want to expose it to users of the library to ensure that changes in DI implementation won't affect users of the library.
class ScanbotSDKpublic ScanbotSDK(@NotNull
android.app.Activity activity)
public ScanbotSDK(@NotNull
android.app.Service service)
public ScanbotSDK(@NotNull
android.app.Application application)
public boolean isLicenseActive()
Provides the status of the license. Returned value is consistent during lifetime of the process, i.e. if license is active at application start-up it will remain that way until app will be killed.
true if Scanbot SDK license is active and all features can be used normally.
false if license is not active and usage of SDK features will result in either
RuntimeException or no-op.public boolean isLicenseValid()
Provides the status of the license. Returned value is consistent during lifetime of the process, i.e. if license is active at application start-up it will remain that way until app will be killed.
true if Scanbot SDK license is active and all features can be used normally.
false if license is not active and usage of SDK features will result in either
RuntimeException or no-op.@NotNull public io.scanbot.sap.SdkLicenseInfo getLicenseInfo()
Provides full info of the license current state. Returned value is consistent during lifetime of the process, i.e. if license is active at application start-up it will remain that way until app will be killed.
@NotNull public io.scanbot.sdk.persistence.PageFileStorage getPageFileStorage()
Provides PageFileStorage.
null@Nullable public SdkComponent getSdkComponent()
@NotNull public io.scanbot.sdk.docprocessing.PageProcessor pageProcessor()
Provides PageProcessor.
null@NotNull public io.scanbot.sdk.persistence.BarcodeFileStorage barcodeFileStorage()
Provides BarcodeFileStorage.
null@NotNull public io.scanbot.sdk.persistence.fileio.FileIOProcessor fileIOProcessor()
Provides FileIOProcessor.
null@NotNull public PDFRenderer pdfRenderer()
Provides functionality for PDF rendering.
interface PDFRenderer.@NotNull public io.scanbot.sdk.ocr.OpticalCharacterRecognizer ocrRecognizer()
Provides functionality for OCR .
@NotNull public io.scanbot.sdk.persistence.cleanup.Cleaner cleaner()
Provides Cleaner.
null@NotNull public io.scanbot.sdk.blob.BlobManager blobManager()
Provides BlobManager.
null@NotNull public io.scanbot.sdk.blob.BlobFactory blobFactory()
Provides BlobFactory.
null@NotNull public io.scanbot.sdk.payformscanner.PayFormScanner payFormScanner()
Provides PayFormScanner.
null@NotNull public io.scanbot.sdk.mrzscanner.MRZScanner mrzScanner()
Provides MRZScanner.
null@NotNull public io.scanbot.sdk.textorientation.TextOrientationScanner textOrientationScanner()
Provides TextOrientationScanner.
null@NotNull public io.scanbot.sdk.dcscanner.DCScanner dcScanner()
Provides DCScanner.
null@NotNull public io.scanbot.sdk.barcode.ScanbotBarcodeDetector barcodeDetector()
Provides ScanbotBarcodeDetector.
null@NotNull public io.scanbot.sdk.tiff.TIFFWriter tiffWriter()
Provides io.scanbot.tiffwriter.TIFFWriter.
null@NotNull public io.scanbot.sdk.persistence.PageFileStorage pageFileStorage()
Provides PageFileStorage.
null@NotNull public io.scanbot.sdk.chequescanner.ChequeScanner chequeScanner()
Provides ChequeScanner.
null@NotNull public io.scanbot.sdk.hicscanner.HealthInsuranceCardScanner healthInsuranceCardScanner()
Provides HealthInsuranceCardScanner.
null@NotNull public io.scanbot.sdk.filterpredictor.FilterPredictor filterPredictor()
Provides FilterPredictor.
null@NotNull public io.scanbot.multipleobjectsscanner.MultipleObjectsDetector multipleObjectsDetector()
Provides MultipleObjectsDetector.
null@Deprecated @NotNull public io.scanbot.sdk.idcardscanner.IdCardScanner idCardScanner()
Provides IdCardScanner
null@NotNull public io.scanbot.sdk.genericdocument.GenericDocumentRecognizer genericDocumentRecognizer()
Provides GenericDocumentRecognizer
null@NotNull public io.scanbot.sdk.process.ImageProcessor imageProcessor()
Provides ImageProcessor.
null@NotNull public io.scanbot.sdk.process.BlurEstimator blurEstimator()
Provides BlurEstimator.
null@NotNull public BusinessCardsImageProcessor businessCardsImageProcessor()
Provides interface BusinessCardsImageProcessor.
interface BusinessCardsImageProcessor. Never nullinterface BusinessCardsImageProcessor@NotNull public io.scanbot.sdk.core.contourdetector.ContourDetector contourDetector()
Provides ContourDetector.
null@NotNull public io.scanbot.sdk.generictext.GenericTextRecognizer genericTextRecognizer()
Provides GenericTextRecognizer.
null@NotNull public io.scanbot.sdk.licenseplate.LicensePlateScanner licensePlateScanner()
Provides LicensePlateScanner.
null@NotNull public io.scanbot.sdk.nfcscanner.passport.PassportNfcScanner passportNfcScanner()
Provides PassportNfcScanner.
null@NotNull
public <T> io.scanbot.sdk.ui.result.ResultRepository<T> resultRepositoryForClass(@NotNull
java.lang.Class<T> clazz)
Provides result repository for the given class
To get access to the full result object it is needed to do the following:
val resultWrapper: ResultWrapper val result = ScanbotSDK(context).resultRepositoryForClass(resultWrapper.clazz).getResultAndErase(resultWrapper.resultId) The result object will contain the full GenericDocument object
clazz - class of the result object, might be taken from io.scanbot.sdk.ui.result.ResultWrapper