blinkcard / blinkcard-android

SDK for scanning and OCR of credit or payment cards. Contains native Android SDK, code samples and documentation.
45 stars 5 forks source link

how to scan front side only? #13

Closed mihirmodiofficial closed 2 years ago

mihirmodiofficial commented 3 years ago

i am using

        ActivityRunner.startActivityForResult(this, BLINK_CARD_REQUEST_CODE, settings)

but its ask for scanning both the side

anjapenic commented 3 years ago

Hello @mihirmodiofficial,

Since the BlinkCard v2.0 and higher is now a recognizer based on machine learning, it will search for the info you want to get from a card until it extracts it. That is, if it doesn't find the wanted info on the front side, it will ask you to scan the back side.

This is highly dependable on how the actual card is organized - for example, if the card you want to scan has CVV and IBAN on the back, you can set recognizer.setExtractCvv(false); recognizer.setExtractIban(false); , and it will scan only the front.

However, there are cards that have info such as expiry date on the back and in that case, it will ask you to scan the back side as well since it didn't find the wanted info on the front.

So, it is not actually possible to set the SDK to scan only the front of the card, unless you know the exact format of the cards you will scan and are sure that the info you want to extract will always be on the front of the card. In that case, you can disable scanning of the info you expect to find on the back and it will scan only the front.

Hope this helps!

Regards, Anja

anjapenic commented 3 years ago

Hello @mihirmodiofficial,

Just wanted to make a quick follow-up here. Have found our previous reply helpful? If you have any questions, feel free to ask!

Regards, Anja

divyangsolanki commented 3 years ago

@anjapenic @mihirmodiofficial @matvidako @Cerovec I want just single side scanning and i tried your solution and it is working fine. But, in iOS we get callback once the front side scanning is completed without setting any required fields so is there any other we can do the same thing in Android? Like any how we can set MetadataCallbacks and after that we can get callback in FirstSideRecognitionCallback.

anjapenic commented 3 years ago

Hello @divyangsolanki,

You will have to implement a Custom UI (we have a sample app for BlinkID SDK which showcases how to do that - https://github.com/BlinkID/blinkid-android/tree/master/BlinkIDSample/BlinkID-CustomUISample), and use RecognizerRunnerView, set the setFirstSideRecognitionCallback​ in MetadataCallbacks object.

Hope this helps, let us know if you require further assistance.

Best regards, Anja

divyangsolanki commented 3 years ago

@anjapenic Yes, by using this sample app i can get the front side scanning. Thank you for the quick response. @

anjapenic commented 3 years ago

Hi @divyangsolanki,

Great to hear that, let us know if there's anything else we could help with!

Best regards, Anja

yeazullah-aziz commented 1 year ago

recognizer.setExtractCvv(false); recognizer.setExtractIban(false);

how does it work now?

df-nikhil commented 7 months ago

recognizer.setExtractCvv(false); recognizer.setExtractIban(false);

Are these methods available for browser?

somyaguptagit commented 7 months ago

Hello @df-nikhil You can refer to this article to disable both Cvv and Iban for In-browser settings, https://help.microblink.com/s/direct-article?Article=ka08W000000st3HQAQ Please let us know if you have any additional questions.