Class BaseCroppingActivity
-
- 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 BaseCroppingActivity extends BaseActivity
Base class is to hold only code common for all Cropping- activities.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBaseCroppingActivity.InternalResultWrapper-class for all information, obtained as a result of RTU activity work.
public abstract classBaseCroppingActivity.InternalResultContractPredefined AndroidX Activity Result API contract, ScanbotSDK-flavored.
Implementation of ActivityResultContract for Cropping 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 interfaceBaseCroppingActivity.AutoCancellableResultResult 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<CroppingConfiguration, Unit>createView
-
Constructor Summary
Constructors Constructor Description BaseCroppingActivity()
-
Method Summary
Modifier and Type Method Description abstract Function1<CroppingConfiguration, Unit>getCreateView()Will be overridden by descendants that define their own composable views, but we need to call it in onCreate here. UnitonCreate(Bundle savedInstanceState)final UnitonCancelCropping()User wants to cancel cropping. final UnitonCancelCroppingLicenseInvalid()Cancel cropping because of the invalid license. final UnitfinishWithResult(String documentUuid, String pageUuid)Delivers result to the user. final UnitfinishWithError(String documentUuid, String pageUuid, String errorMessage)Delivers error to the user. final static <A extends Any> IntentnewIntentInternal(Context context, Class<A> activityClass, CroppingConfiguration configuration)-
-
Method Detail
-
getCreateView
abstract Function1<CroppingConfiguration, Unit> getCreateView()
Will be overridden by descendants that define their own composable views, but we need to call it in onCreate here.
-
onCancelCropping
final Unit onCancelCropping()
User wants to cancel cropping.
-
onCancelCroppingLicenseInvalid
final Unit onCancelCroppingLicenseInvalid()
Cancel cropping because of the invalid license.
-
finishWithResult
final Unit finishWithResult(String documentUuid, String pageUuid)
Delivers result to the user.
-
finishWithError
final Unit finishWithError(String documentUuid, String pageUuid, String errorMessage)
Delivers error to the user.
-
newIntentInternal
final static <A extends Any> Intent newIntentInternal(Context context, Class<A> activityClass, CroppingConfiguration configuration)
-
-
-
-