BlinkID / blinkid-ui-android

Customizable UI library that includes camera management, scanning screen, and document selection module.
35 stars 10 forks source link

Recognition state is getting reset #41

Closed samirpramanik closed 5 years ago

samirpramanik commented 5 years ago

Hi,

We are using Blink ID 4.8.0 for UAE ID card recognition. Once we scan the first side, we proceed to scanning the back side of the ID. But sometimes of there is significant glare on the screen, we are prompted with the glare warning text and then the recognition resets to the first side again. The message comes as - Please scan the front side of the selected document or choose another. Ideally it should not reset if back scanning is having issues.

Thanks!

samirpramanik commented 5 years ago

This is reproducible even on the app published on google play store. Sometimes, the message changes to -

Scan back side

, but denies to scan back side and recognizes only the front side again.

matvidako commented 5 years ago

Hi,

thanks for reporting the issue.

Does this happen only when glare is detected or also if it just takes too long to scan?

samirpramanik commented 5 years ago

For my case, it was taking too long to scan because of glare. So, i am not sure if it is the glare or the duration.

matvidako commented 5 years ago

Ok, I managed to reproduce it.

Can you try this branch and see if it works as expected?

If it does, we can make setting timeout value part of the api so you'll be able to increase it, default is 10 seconds.

samirpramanik commented 5 years ago

Hi,

The issue is fixed by this commit. Please provide an API for configuring the timeout value. Also, i have one more doubt : There is another timeout value where on timeout we show a dialog and prompt user to change document or continue. Its timeout value is : private const val SCAN_TIMEOUT_MILLIS = 16_000L Could you please explain if this timeout is different and what exactly is the value of 16_000L, because the dialog is definitely not coming after 16 seconds. Now, i understand that subsequent timeouts are doubled, but even the first timeout dialog comes after more than a minute.

matvidako commented 5 years ago

Current timeout(SCAN_TIMEOUT_MILLIS) starts as soon as the user opens the screen and is used to remind the user to check the selected document if the scanning isn't working. It restarts when you switch to scanning back side, that could be the reason it isn't showing after 16 seconds.

The timeout I've added in the new branch is set on our SDKs recognizers and is used to tell the SDK when to stop trying to get full results and return partial results. In BlinkID-UI we just ignore partial results and restart scanning, that is why you were having problems.

samirpramanik commented 5 years ago

It restarts when you switch to scanning back side, that could be the reason it isn't showing after 16 seconds.

  • I was referring to the front side itself. I do not see the dialog in 16 seconds. It is taking longer than that exactly 5 minutes. However, on the app in the playstore, it comes in 16 seconds.
samirpramanik commented 5 years ago

I fixed the issue. Actually that timeout was being overridden in my base scan activity. Thanks for your help! Please provide the API for timeout configuration.

samirpramanik commented 5 years ago

Hello, could you please let me know when can i get the API to configure scan timeout.

matvidako commented 5 years ago

Hi,

new release is ready, just for you v4.8.0.1

samirpramanik commented 5 years ago

Thanks man! Cheers!