Class BaseBarcodeScannerActivity
-
- 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 BaseBarcodeScannerActivity extends BaseActivity
Base class is to hold only code common for all Barcode- activities.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
BaseBarcodeScannerActivity.InternalResult
Wrapper-class for all information, obtained as a result of RTU activity work.
public abstract class
BaseBarcodeScannerActivity.InternalResultContract
Predefined AndroidX Activity Result API contract, ScanbotSDK-flavored.
Implementation of ActivityResultContract for Barcode 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
BaseBarcodeScannerActivity.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<BarcodeScannerConfiguration, Unit>
createView
-
Constructor Summary
Constructors Constructor Description BaseBarcodeScannerActivity()
-
Method Summary
Modifier and Type Method Description abstract Function1<BarcodeScannerConfiguration, 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)
final Unit
onCancelScanning()
User wants to cancel scanning. final Unit
onSnappingTimeout()
Timeout time has passed. final Unit
onCancelScanningLicenseInvalid()
Cancel barcode scanning because of the invalid license. final Unit
finishWithResult(BarcodeScannerResult barcodeScanningResult)
Delivers scanned barcode content to the user. final static <A extends Any> Intent
newIntentInternal(Context context, Class<A> activityClass, BarcodeScannerConfiguration scannerConfiguration)
-
-
Method Detail
-
getCreateView
abstract Function1<BarcodeScannerConfiguration, 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 barcode scanning because of the invalid license.
-
finishWithResult
final Unit finishWithResult(BarcodeScannerResult barcodeScanningResult)
Delivers scanned barcode content to the user.
-
newIntentInternal
final static <A extends Any> Intent newIntentInternal(Context context, Class<A> activityClass, BarcodeScannerConfiguration scannerConfiguration)
-
-
-
-