public class ScanbotSDK
extends java.lang.Object
Typical use case is to create this object in Activity.onCreate(Bundle) or
Service.onCreate(), but it's allowed to create it during any other point of lifecycle
before onDestroy.
Must be operated on the main thread.
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.
| Constructor and Description |
|---|
ScanbotSDK(android.app.Activity activity) |
ScanbotSDK(android.app.Service service) |
| Modifier and Type | Method and Description |
|---|---|
BlobFactory |
blobFactory()
Provides
BlobFactory. |
BlobManager |
blobManager()
Provides
BlobManager. |
Cleaner |
cleaner()
Provides
Cleaner. |
DocumentDraftExtractor |
documentDraftExtractor()
Provides
DocumentDraftExtractor. |
DocumentProcessor |
documentProcessor()
Provides
DocumentProcessor. |
boolean |
isLicenseActive()
Provides the status of the license.
|
PageFactory |
pageFactory()
Provides
PageFactory. |
PayFormScanner |
payFormScanner()
Provides
net.doo.snap.payformscanner.PayFormScanner. |
TextRecognition |
textRecognition()
Provides functionality for recognize text.
|
public ScanbotSDK(android.app.Activity activity)
public ScanbotSDK(android.app.Service service)
public boolean isLicenseActive()
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 DocumentProcessor documentProcessor()
DocumentProcessor. Must be called from the main thread.DocumentProcessor. Never nullpublic TextRecognition textRecognition()
TextRecognition. Should be acquired for each case of text recognizing.public Cleaner cleaner()
Cleaner. Must be called from the main thread.Cleaner. Never nullpublic DocumentDraftExtractor documentDraftExtractor()
DocumentDraftExtractor. Must be called from the main thread.DocumentDraftExtractor. Never nullpublic PageFactory pageFactory()
PageFactory. Must be called from the main thread.PageFactory. Never nullpublic BlobManager blobManager()
BlobManager. Must be called from the main thread.BlobManager. Never nullpublic BlobFactory blobFactory()
BlobFactory. Must be called from the main thread.BlobFactory. Never nullpublic PayFormScanner payFormScanner()
net.doo.snap.payformscanner.PayFormScanner. Must be called from the main thread.net.doo.snap.payformscanner.PayFormScanner. Never null