ID Capture Listener

Defined in package com.scandit.datacapture.id.capture

IdCaptureListener
interface IdCaptureListener

Added in version 6.2.0

Listener interface for id capture.

onObservationStarted(mode)
void onObservationStarted(@NonNull IdCapture mode)

Added in version 6.2.0

Called when the listener starts observing the id capture instance.

onObservationStopped(mode)
void onObservationStopped(@NonNull IdCapture mode)

Added in version 6.2.0

Called when the listener stops observing the id capture instance.

onIdCaptured(mode, session, data)
void onIdCaptured(@NonNull IdCapture mode,
        @NonNull IdCaptureSession session,
        FrameData data)

Added in version 6.2.0

Called whenever a document is recognized and parsed. In this callback IdCaptureSession.newlyCapturedId is guaranteed to be non-null.

onIdLocalized(mode, session, data)
void onIdLocalized(@NonNull IdCapture mode,
        @NonNull IdCaptureSession session,
        FrameData data)

Added in version 6.10.0

Called whenever a personal identification document or its part is localized within a frame. A document or its part is considered localized when it’s detected in a frame, but its data is not yet extracted. In this callback IdCaptureSession.newlyLocalizedOnlyId is guaranteed to be non-null.

onIdRejected(mode, session, data)
void onIdRejected(@NonNull IdCapture mode,
        @NonNull IdCaptureSession session,
        FrameData data)

Added in version 6.10.0

Called whenever a personal identification document or its part is recognized in a frame, but rejected. A document is rejected if (a) it’s not enabled in the settings (see IdCaptureSettings.supportedDocuments), (b) it’s a barcode of a correct symbology or a Machine Readable Zone (MRZ), but the data is encoded in an unexpected/incorrect format, (c) it’s a voided document and “IdCaptureSession.RejectVoidedIds” is enabled. In this callback IdCaptureSession.newlyRejectedId is guaranteed to be non-null.

onErrorEncountered(mode, error, session, data)
void onErrorEncountered(@NonNull IdCapture mode,
        @NonNull Throwable error,
        @NonNull IdCaptureSession session,
        FrameData data)

Added in version 6.5.0

Called whenever an error occurs during the document scanning process.

Deprecated since version 6.18.0: This method is no longer executed by the listener. See onIdRejected() and onIdCaptureTimedOut() for scenarios previously reported by this callback.

onIdCaptureTimedOut(mode, session, data)
void onIdCaptureTimedOut(@NonNull IdCapture mode,
        @NonNull IdCaptureSession session,
        FrameData data)

Added in version 6.16.0

Called whenever a document is localized, but could not be captured within a period of time. This can happen, for example, when the document contains defects preventing a successful scan or when the document is not supported by Scandit DataCapture.