Class BaseDocumentScannerActivity
-
- All Implemented Interfaces:
-
io.scanbot.sdk.ui_v2.common.activity.Cancelable
,io.scanbot.sdk.ui_v2.common.activity.Initializable
,io.scanbot.sdk.ui_v2.common.activity.Licensable
public abstract class BaseDocumentScannerActivity extends BaseActivity
Base class is to hold only code common for all Document- activities.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
BaseDocumentScannerActivity.InternalResult
Wrapper-class for all information, obtained as a result of RTU activity work.
public abstract class
BaseDocumentScannerActivity.InternalResultContract
Predefined AndroidX Activity Result API contract, ScanbotSDK-flavored.
Implementation of ActivityResultContract for Document RTU scanner activity.
Encapsulates all the hassle of input and result data mapping into- and from intent's bundle.
Please refer to Scanbot SDK documentation: https://docs.scanbot.io/document-scanner-sdk/android/features/feature-overview/
public interface
BaseDocumentScannerActivity.AutoCancellableResult
Result wrapping entity for component, that support automatic scanning cancelling and closing due to timer.
-
Field Summary
Fields Modifier and Type Field Description private final Function1<DocumentScanningFlow, Unit>
createView
-
Constructor Summary
Constructors Constructor Description BaseDocumentScannerActivity()
-
Method Summary
Modifier and Type Method Description abstract Function1<DocumentScanningFlow, Unit>
getCreateView()
Will be overridden by descendants that define their own composable views, but we need to call it in onCreate here. Unit
onCreate(Bundle savedInstanceState)
Boolean
onKeyDown(Integer keyCode, KeyEvent event)
final Unit
onCancelScanning()
User wants to cancel scanning. final Unit
onSnappingTimeout()
Timeout time has passed. final Unit
onCancelScanningLicenseInvalid()
Cancel document scanning because of the invalid license. final Unit
finishWithResult(String documentUuid)
Delivers scanned document content to the user. final static <A extends Any> Intent
newIntentInternal(Context context, Class<A> activityClass, DocumentScanningFlow scannerConfiguration)
-
-
Method Detail
-
getCreateView
abstract Function1<DocumentScanningFlow, Unit> getCreateView()
Will be overridden by descendants that define their own composable views, but we need to call it in onCreate here.
-
onCancelScanning
final Unit onCancelScanning()
User wants to cancel scanning.
-
onSnappingTimeout
final Unit onSnappingTimeout()
Timeout time has passed.
-
onCancelScanningLicenseInvalid
final Unit onCancelScanningLicenseInvalid()
Cancel document scanning because of the invalid license.
-
finishWithResult
final Unit finishWithResult(String documentUuid)
Delivers scanned document content to the user.
-
newIntentInternal
final static <A extends Any> Intent newIntentInternal(Context context, Class<A> activityClass, DocumentScanningFlow scannerConfiguration)
-
-
-
-