public class IdCardCameraView implements IIdCardCameraView
Represents camera view for IdCardScanner scanner.
public static io.scanbot.sdk.ui.view.idcard.IdCardCameraView.Companion Companion
public IdCardCameraView(@NotNull
android.content.Context context,
@NotNull
android.util.AttributeSet attrs)
Represents camera view for IdCardScanner scanner.
protected void onDetachedFromWindow()
public void setListener(@NotNull
io.scanbot.sdk.ui.view.idcard.IIdCardCameraView.Listener listener)
listener - which will receive callbacks on user interactions.public void updateState(@NotNull
io.scanbot.sdk.ui.view.idcard.IIdCardCameraView.State newState)
public void setCameraOrientationMode(@NotNull
io.scanbot.sdk.ui.view.base.configuration.CameraOrientationMode cameraOrientationMode)
Sets camera orientation mode
cameraOrientationMode - CameraOrientationMode.LANDSCAPE or CameraOrientationMode.PORTRAITpublic void setCameraModule(@NotNull
io.scanbot.sdk.camera.CameraModule cameraModule)
Set camera module
cameraModule - one of the supported modes - CameraModulepublic boolean handle(@NotNull
io.scanbot.sdk.camera.FrameHandlerResult<io.scanbot.sdk.idcardscanner.IdScanResult,io.scanbot.sdk.SdkLicenseError> result)
public void setIdScanner(@NotNull
io.scanbot.sdk.idcardscanner.IdCardScanner idCardScanner)
Sets instance of Id Card scanner to be used for this view
public void setAcceptedDocumentTypes(@NotNull
java.util.ArrayList<io.scanbot.sdk.idcardscanner.IdScanResult.DocumentType> documentTypes)
Accepted document types. All other document types will be ignored.
By default - IdScanResult.DocumentType.DEFAULT_TYPES.
public void setSharpnessAcceptanceFactor(float sharpnessAcceptanceFactor)
Accepted minimal sharpness score. Images with a score less than that will be rejected with RecognitionStatus::ErrorTooBlurry.
Default is 80
0 - any image will be accepted. 80 - a good compromise; the recommended setting. 100 - only very sharp images will be accepted.