public class IdCardScannerFrameHandler
Performs ID card data detection on camera preview frames. Outputs results via
interface IdCardScannerFrameHandler.ResultHandler.
Preview frame considered intercepted if at least one
interface IdCardScannerFrameHandler.ResultHandler returns true from
IdCardScannerFrameHandler.ResultHandler.handle
public static io.scanbot.sdk.idcardscanner.IdCardScannerFrameHandler.Companion Companion
public IdCardScannerFrameHandler(@NotNull
IdCardScanner idCardScanner,
boolean shouldRecognize)
Performs ID card data detection on camera preview frames. Outputs results via
interface IdCardScannerFrameHandler.ResultHandler.
Preview frame considered intercepted if at least one
interface IdCardScannerFrameHandler.ResultHandler returns true from
IdCardScannerFrameHandler.ResultHandler.handle
shouldRecognize - whether to recognize field and their data on ID card. Defaults to trueinterface IdCardScannerFrameHandler.ResultHandler,
interface IdCardScannerFrameHandler.ResultHandler,
addResultHandlerpublic boolean isEnabled()
Parameter determines if ID card detection is enabled. In case of false value incoming
frames are skipped.
Default is true
public void setEnabled(boolean p)
Parameter determines if ID card detection is enabled. In case of false value incoming
frames are skipped.
Default is true
@Synchronized
public boolean handleFrame(@NotNull
io.scanbot.sdk.camera.FrameHandler.Frame previewFrame)
public void addResultHandler(@NotNull
io.scanbot.sdk.idcardscanner.IdCardScannerFrameHandler.ResultHandler resultHandler)
Registers result handler which will be notified about ID card detection results.
Results are coming on the worker thread. Don't forget to move execution to main thread before updating UI.
resultHandler - handler to register. Must not be null. If handler was alreadyregistered, nothing happens.public void removeResultHandler(@NotNull
io.scanbot.sdk.idcardscanner.IdCardScannerFrameHandler.ResultHandler resultHandler)
Unregisters handler.
resultHandler - handler to unregister. If it was not registered before, nothing happens.public void clearResultHandlers()
Unregisters all handlers. If nothing was registered before, nothing happens.
public void <no name provided>()
Continuously notified about ID card scanner results.
@JvmStatic @NotNull public static IdCardScannerFrameHandler attach(@NotNull io.scanbot.sdk.ui.camera.IScanbotCameraView cameraView, @NotNull IdCardScanner idCardScanner, boolean shouldRecognize)
Convenience method for creating new class IdCardScannerFrameHandler and adding it
as FrameHandler to given camera view.
cameraView - cameraView to attach handler toidCardScanner - scanner to perform ID card detectionshouldRecognize - whether to recognize field and their data on ID card. Defaults to trueclass IdCardScannerFrameHandler