IdBarcodeRecognizer
is now deprecated as it is no longer maintained and all of its functionalities are available withBlinkIdSingleSideRecognizer
andBlinkIdMultiSideRecognizer
- To achieve the same
IdBarcodeRecognizer
behavior with the BlinkID generic recognizers, theRecognitionModeFilter
must be limited to only theBarcodeId
recognition mode:
recognizer = BlinkIdSingleSideRecognizer()
val recognitionModeFilter: RecognitionModeFilter = RecognitionModeFilter(false, false, false, false, true, false)
recognizer.recognitionModeFilter = recognitionModeFilter
- The results are obtained by directly using the
result
orbarcodeResult
property from the recognizer result:recognizerBundle.loadFromIntent(data) val result: BlinkIdSingleSideRecognizer.Result = recognizer.result val name = result.firstName?.value() //or val barcodeResult: BlinkIdSingleSideRecognizer.Result = recognizer.result.barcodeResult var barcodeFirstName = barcodeResult.firstName
- The root package has been renamed from
com.microblink
tocom.microblink.blinkid
. To implement this change, you should simply replace all occurrences ofcom.microblink
withcom.microblink.blinkid
. Most of these changes should be on imports of BlinkID SDK Java classes. Also, all of the resources havemb_blinkid_
prefix instead ofmb_
.
- One very important change came when it comes to using BlinkID recognizers - they have been renamed to make them more understandable for new developers and users:
- Basic single-sided recognizer, which used to be named
BlinkIdRecognizer
, is now called BlinkIdSingleSideRecognizer, and should be used for scanning one-sided documents or if you wish to capture only the front side of it - More advanced recognizer, which used to be named
BlinkIdCombinedRecognizer
, is now called BlinkIdMultiSideRecognizer, and should be used for scanning the documents which have information that you want to extract on more than one side
- Basic single-sided recognizer, which used to be named
- Minimum supported SDK version has been updated from 16 to 21. This means that the devices that have an Android version lower than Android 5.0 (Lollipop) will no longer support BlinkID SDK - all of the devices with Android 5.0 and above are still supported.
- Devices that are based on the Intel x86 architecture, rather than ARMv7, are no longer supported. x86 and x86_64 architectures are used on very few devices today with most of them being manufactured before 2015, and only a few after that (e.g. Asus Zenfone 4). According to the Device catalog on Google Play Console, these devices make up about 1% of all Android devices (223 out of 22074 devices that have an API level of 21 and above support this architecture).
BlinkIdSingleSideRecognizer
andBlinkIdMultiSideRecognizer
results now return nullableStringResult
instead ofString
for the text fields, supporting multiple scripts. If we don't expect theStringResult
on the document, that result will benull
. If the text field is expected on the document, but we did't manage to read it, theStringResult
will contain emptyString
.
BlinkIdSingleSideRecognizer
andBlinkIdMultiSideRecognizer
results now return nullableDateResult
instead ofString
for the date fields, supporting multiple scripts. If we don't expect theDateResult
on the document, that result will benull
. If the date field is expected on the document, but we did't manage to read it, theDateResult
will contain emptyString
.
- We have added
CardOrientation
result that can help you distinguish betweenVertical
andHorizontal
documents. It is a part of theImageAnalysisResult
result. - We have added new result property of an
AdditionalProcessingInfo
type that provides information aboutmissingMandatoryFields
,invalidCharacterFields
, andextraPresentFields
- We have unified
DataMatchResult
andDataMatchDetailedInfo
into a single structureDataMatchResult
(removeddataMatchDetailedInfo
result member)
-
In BlinkID v6.0.0 we added support for one-line scanning which will make it easier to test the SDK and to do simple scans without any additional configuration. Two new classes that extend
ActivityResultContract
class have been added and that can be called in a similar way toMbScan
. -
Classes
OneSideDocumentScan
andTwoSideDocumentScan
can be instantiated and launched without instantiating additionalRecognizers
andUISettings
. If you wish to just launch the scanning with default settings, it can be done with only a few lines: define an instance of a classOneSideScanResult
orTwoSideScanResult
by using a functionregisterForActivityResult
and passing one of the document scanners as an argument
private val resultLauncher =
registerForActivityResult(TwoSideDocumentScan()) { twoSideScanResult: TwoSideScanResult ->
when (twoSideScanResult.resultStatus) {
ResultStatus.FINISHED -> {
// code after a successful scan
// use twoSideScanResult.result for fetching results, for example:
val firstName = twoSideScanResult.result?.firstName?.value()
}
ResultStatus.CANCELLED -> {
// code after a cancelled scan
}
ResultStatus.EXCEPTION -> {
// code after a failed scan
}
else -> {}
}
}
- It is recommended to check the result status as shown in order to avoid crashes before doing something with the result itself. Launching the scanning is then done by a simple function call:
twoSideScanResult.launch()
- This will launch a scanning activity which will return the scanning result through callbacks and specific scan results can be obtained through result variable which is an instance of
OneSideScanResult
orTwoScanSideResult
.
- New onboarding screens have been added to the SDK, providing the users with a small tutorial on how to scan properly; this will potentially improve the successful scan rate.
- Onboarding consists of two parts:
- Introduction dialog - appears as soon as the user starts the scanning process in the shape of an overlay dialog with an instruction image and an instruction text, which can be dismissed by a press of a button
- Onboarding dialog - appears at a press of an onboarding help button, a small FAB located in the bottom right corner, which has an additional tooltip with a "Need help?" text which is shown after a timeout or a tap on the screen
- By default, both the introduction and onboarding dialogs are set to show, and onboarding button tooltip delay is set to 12 seconds. These settings can be manually altered by configuring
BlinkIdUISettings
which are used as a parameter when the scanning function is called. - Example - setting introduction dialog, onboarding dialog visibility, and tooltip delay time:
val blinkIdUISettings = BlinkIdUISettings(recognizerBundle)
blinkIdUISettings.setShowIntroductionDialog(false) // set to true by default
blinkIdUISettings.setShowOnboardingInfo(true) // set to true by default
blinkIdUISettings.setShowTooltipTimeIntervalMs(8000) // set to 12000 by default (in milliseconds)
- Onboarding help button will only be shown if the onboarding dialog is set to true