Class BarcodeScannerActivity
-
- All Implemented Interfaces:
-
io.scanbot.sdk.ui_v2.common.activity.Cancelable,io.scanbot.sdk.ui_v2.common.activity.IForceCloseCallback,io.scanbot.sdk.ui_v2.common.activity.Initializable,io.scanbot.sdk.ui_v2.common.activity.Licensable
public final class BarcodeScannerActivity extends BaseBarcodeScannerActivity
Represents camera screen for Barcodes scanning.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBarcodeScannerActivity.ResultContractPredefined 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.
public final classBarcodeScannerActivity.ResultWrapper-class for all information, obtained as a result of RTU activity work.
public classBarcodeScannerActivity.Companion
-
Field Summary
Fields Modifier and Type Field Description private WeakReference<IForceCloseCallback>forceCloseCallbackprivate final Function1<BarcodeScannerScreenConfiguration, Unit>createViewprivate ResultRepository<BarcodeScannerUiResultInternal>resultsRepositorypublic final static BarcodeScannerActivity.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description BarcodeScannerActivity()
-
Method Summary
Modifier and Type Method Description final WeakReference<IForceCloseCallback>getForceCloseCallback()final UnitsetForceCloseCallback(WeakReference<IForceCloseCallback> forceCloseCallback)Function1<BarcodeScannerScreenConfiguration, Unit>getCreateView()Will be overridden by descendants that define their own composable views, but we need to call it in onCreate here. ResultRepository<BarcodeScannerUiResultInternal>getResultsRepository()UnitsetResultsRepository(ResultRepository<BarcodeScannerUiResultInternal> resultsRepository)UnitforceClose()This method is called when the activity is closed by the timeout with canceling UnitsubmitCurrentResult()This method is called when the activity is closed by timeout with returning the result UnitonCreate(Bundle savedInstanceState)final static IntentnewIntent(Context context, BarcodeScannerScreenConfiguration scannerConfiguration)Factory method to construct intent to start this activity. static BarcodeScannerActivity.ResultextractResult(Integer resultCode, Intent data)Extract result entity encapsulating this RTU-activity's work. final static UnitforceClose(Context context, Boolean keepResult)Triggers the force-finishing of the RTU UI Activity -
-
Method Detail
-
getForceCloseCallback
final WeakReference<IForceCloseCallback> getForceCloseCallback()
-
setForceCloseCallback
final Unit setForceCloseCallback(WeakReference<IForceCloseCallback> forceCloseCallback)
-
getCreateView
Function1<BarcodeScannerScreenConfiguration, Unit> getCreateView()
Will be overridden by descendants that define their own composable views, but we need to call it in onCreate here.
-
getResultsRepository
ResultRepository<BarcodeScannerUiResultInternal> getResultsRepository()
-
setResultsRepository
Unit setResultsRepository(ResultRepository<BarcodeScannerUiResultInternal> resultsRepository)
-
forceClose
Unit forceClose()
This method is called when the activity is closed by the timeout with canceling
-
submitCurrentResult
Unit submitCurrentResult()
This method is called when the activity is closed by timeout with returning the result
-
newIntent
@Deprecated(message = "Migrate to new AndroidX Result API. Please see ResultContract.") final static Intent newIntent(Context context, BarcodeScannerScreenConfiguration scannerConfiguration)
Factory method to construct intent to start this activity.
Deprecated: please see ResultContract
-
extractResult
static BarcodeScannerActivity.Result extractResult(Integer resultCode, Intent data)
Extract result entity encapsulating this RTU-activity's work.
-
forceClose
final static Unit forceClose(Context context, Boolean keepResult)
Triggers the force-finishing of the RTU UI Activity
- Parameters:
context- Android app context
-
-
-
-