Closed samirpramanik closed 5 years ago
Hi,
you can use mRecognizerBundle.setNumMsBeforeTimeout()
.
Note that this timeout works differently than the one in BlinkID UI, it will start the timer when card number is read. We'll be changing it to start when the card is detected in the next update.
If you need a different behaviour, you could just implement your own timer.
Hi,
Do we have a listener/callback for this timeout? We wish to implement something upon timeout. Is it possible using the above configurations or do we have to write our own custom timer?
If you use setNumMsBeforeTimeout()
, onScanningDone()
will be called in your ScanResultListener
. The difference between timeout and successful scan is that the parameter will be RecognitionSuccessType.PARTIAL
instead of RecognitionSuccessType.SUCCESSFUL
.
Hi,
Earlier, we used the following snippet to achieve timeout handling for our scan activity that extends BaseDocumentScanActivity :
protected open fun createScanTimeoutHandler() : ScanTimeoutHandler = DefaultScanTimeoutHandler(SCAN_TIMEOUT_MILLIS); protected open fun createScanTimeoutListener() = createDefaultScanTimeoutListener()
Now we are using an activity that implementsRecognizerRunnerFragment.ScanningOverlayBinder
for card screen. We are usinguiSettings = new BlinkCardUISettings(mRecognizerBundle); scanningOverlay = new BlinkCardOverlayController(uiSettings, scanResultListener);
for scanning card. So, how can we achieve the timeout handling so that we can perform some operation on timeout.