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 interface
BaseCroppingActivity.InternalResult
Wrapper-class for all information, obtained as a result of RTU activity work.
public abstract class
BaseCroppingActivity.InternalResultContract
Predefined 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 interface
BaseCroppingActivity.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<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. Unit
onCreate(Bundle savedInstanceState)
final Unit
onCancelCropping()
User wants to cancel cropping. final Unit
onCancelCroppingLicenseInvalid()
Cancel cropping because of the invalid license. final Unit
finishWithResult(String documentUuid, String pageUuid)
Delivers result to the user. final Unit
finishWithError(String documentUuid, String pageUuid, String errorMessage)
Delivers error to the user. final static <A extends Any> Intent
newIntentInternal(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)
-
-
-
-