Class ScanbotSDK
-
- All Implemented Interfaces:
-
io.scanbot.sdk.LicensableSdk
,io.scanbot.sdk.barcode.BarcodeScanningSdk
,io.scanbot.sdk.persistence.StorageSpaceAware
public final class ScanbotSDK implements StorageSpaceAware, LicensableSdk, BarcodeScanningSdk
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 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
ScanbotSDK.Companion
-
Field Summary
Fields Modifier and Type Field Description private final SdkLicenseInfo
licenseInfo
private final PageFileStorage
pageFileStorage
private final DocumentApi
documentApi
public final static ScanbotSDK.Companion
Companion
-
Constructor Summary
Constructors Constructor Description ScanbotSDK(Activity activity)
ScanbotSDK(Service service)
ScanbotSDK(Application application)
ScanbotSDK(Context context)
-
Method Summary
-
-
Constructor Detail
-
ScanbotSDK
ScanbotSDK(Activity activity)
-
ScanbotSDK
ScanbotSDK(Service service)
-
ScanbotSDK
ScanbotSDK(Application application)
-
ScanbotSDK
ScanbotSDK(Context context)
-
-
Method Detail
-
getLicenseInfo
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.
-
getPageFileStorage
final PageFileStorage getPageFileStorage()
-
getDocumentApi
final DocumentApi getDocumentApi()
-
getSdkComponent
final SdkComponent getSdkComponent()
-
createPageProcessor
@Deprecated(message = "Use new DOcument API instead.") final PageProcessor createPageProcessor()
Provides PageProcessor.
-
createBarcodeFileStorage
BarcodeFileStorage createBarcodeFileStorage()
Provides BarcodeFileStorage.
-
fileIOProcessor
final FileIOProcessor fileIOProcessor()
Provides FileIOProcessor.
-
createPdfRenderer
final PDFRenderer createPdfRenderer()
Provides functionality for PDF rendering.
-
createOcrRecognizer
final OpticalCharacterRecognizer createOcrRecognizer()
Provides functionality for OCR .
-
createCleaner
final Cleaner createCleaner()
Provides Cleaner.
-
createBlobManager
final BlobManager createBlobManager()
Provides BlobManager.
-
createBlobFactory
final BlobFactory createBlobFactory()
Provides BlobFactory.
-
createMrzScanner
final MRZScanner createMrzScanner()
Provides MRZScanner.
-
createTextOrientationScanner
final TextOrientationScanner createTextOrientationScanner()
Provides TextOrientationScanner.
-
createMedicalCertificateRecognizer
final MedicalCertificateRecognizer createMedicalCertificateRecognizer()
Provides MedicalCertificateRecognizer.
-
createBarcodeDetector
ScanbotBarcodeDetector createBarcodeDetector()
Provides ScanbotBarcodeDetector.
-
createBarcodeDocumentParser
BarcodeDocumentParser createBarcodeDocumentParser()
Provides BarcodeDocumentParser.
-
createTiffWriter
final TIFFWriter createTiffWriter()
Provides io.scanbot.tiffwriter.TIFFWriter.
-
createPageFileStorage
@Deprecated(message = "Use new DOcument API instead.") final PageFileStorage createPageFileStorage()
-
createCheckRecognizer
final CheckRecognizer createCheckRecognizer()
Provides CheckRecognizer.
-
createHealthInsuranceCardScanner
final HealthInsuranceCardScanner createHealthInsuranceCardScanner()
Provides HealthInsuranceCardScanner.
-
createGenericDocumentRecognizer
final GenericDocumentRecognizer createGenericDocumentRecognizer()
Provides GenericDocumentRecognizer
-
createDocumentQualityAnalyzer
final DocumentQualityAnalyzer createDocumentQualityAnalyzer()
Provides DocumentQualityAnalyzer.
-
createContourDetector
final ContourDetector createContourDetector()
Provides ContourDetector.
-
createGenericTextRecognizer
final GenericTextRecognizer createGenericTextRecognizer()
Provides GenericTextRecognizer.
-
createVinScanner
final VinScanner createVinScanner()
Provides VinScanner.
-
createLicensePlateScanner
final LicensePlateScanner createLicensePlateScanner()
Provides LicensePlateScanner.
-
resultRepositoryForClass
final <T extends Any> ResultRepository<T> resultRepositoryForClass(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<GenericDocument> val result = ScanbotSDK(context).resultRepositoryForClass(resultWrapper.clazz).getResultAndErase(resultWrapper.resultId) The result object will contain the full GenericDocument object
- Parameters:
clazz
- class of the result object, might be taken from io.scanbot.sdk.ui.result.ResultWrapper
-
createPdfImagesExtractor
final PdfImagesExtractor createPdfImagesExtractor()
Provides PdfImagesExtractor.
-
createPdfPagesExtractor
final PdfPagesExtractor createPdfPagesExtractor()
Provides PdfPagesExtractor.
-
-
-
-