DOT Android Document library
v8.5.2
Introduction
DOT Android Document provides components for document capture and related functionalities which are easy to integrate into an Android application.
Requirements
DOT Android Document has the following requirements:
Minimum Android API level 21
Minimum Kotlin Gradle plugin version 1.6.0 (if used)
Distribution
Maven Repository
DOT Android Document is distributed as an Android library (.aar
package) stored in the Innovatrics maven repository.
In order to integrate DOT Android Document into your project, the first step is to include the Innovatrics maven repository and Google repository to your top level build.gradle
file.
allprojects {
repositories {
maven {
url 'https://maven.innovatrics.com/releases'
}
}
}
Then, specify the dependency on DOT Android Document library in the module’s build.gradle
file. Dependencies of this library will be downloaded alongside the library.
dependencies {
//…
implementation "com.innovatrics.dot:dot-document:$dotVersion"
//…
}
In order to optimize application size, we also recommend adding the following excludes to your application’s build.gradle
file.
android {
//…
packagingOptions {
exclude("**/libjnidispatch.a")
exclude("**/jnidispatch.dll")
exclude("**/libjnidispatch.jnilib")
exclude("**/*.proto")
}
}
Supported Architectures
DOT Android Document provides binaries for these architectures:
armeabi-v7a
arm64-v8a
x86
x86_64
If your target application format is APK and not Android App Bundle, and the APK splits are not specified, the generated APK file will contain binaries for all available architectures. Therefore we recommend to use APK splits. For example, to generate arm64-v8a
APK, add the following section into your module build.gradle
:
splits {
abi {
enable true
reset()
include 'arm64-v8a'
universalApk false
}
}
If you do not specify this section, the resulting application can become too large in size.
Licensing
In order to use DOT SDK in other apps, it must be licensed. The license can be compiled into the application as it is bound to the application ID specified in build.gradle
:
defaultConfig {
applicationId "com.innovatrics.dot.sample"
//…
}
The application ID can be also retrieved in runtime by calling DotSdk.getApplicationId()
.
In order to obtain the license, please contact your Innovatrics’ representative specifying the application ID. If the application uses build flavors with different application IDs, each flavor must contain a separate license. Put the license file into the raw
resource folder.
Permissions
DOT Android Document declares the following permission in AndroidManifest.xml
:
<uses-permission android:name="android.permission.CAMERA" />
Basic Setup
Initialization
Before using any of the components, you need to initialize DOT SDK with the license and DotDocumentLibrary
object.
InitializeDotSdkUseCase class in the Samples project shows how to initialize DOT SDK with DotDocumentLibrary
. DotSdk.initialize()
method should be called on background thread.
Keep in mind that if you try to use any component without initialization, it will throw an exception. Also be aware that while the app is in background, the system may kill the process to free resources. In such a case, you need to reinitialize the SDK when the app is brought back to the foreground. We recommend to check the SDK initialization status (using DotSdk.isInitialized()
method) in your Fragment’s onViewCreated()
. This technique is implemented in the Samples project.
Deinitialization
When a process (e.g. onboarding) using the DOT Android Document has been completed, it is usually a good practice to free the resources used by it.
You can perform this by calling DotSdk.deinitialize()
. If you want to use the DOT Android Document components again after that point, you need to call DotSdk.initialize()
again. This shouldn’t be performed within the lifecycle of individual Android components.
Logging
Although logging is disabled by default, it can be enabled explicitly by using the following method from the com.innovatrics.dot.core.Logger
class.
Logger.setLoggingEnabled(true)
The appropriate place for this call is within the onCreate()
method of your subclass of android.app.Application
. Each TAG
of a log message starts with the prefix dot-document:
.
This setting enables logging for all DOT Android libraries. |
Keep in mind that logging should be used just for debug purposes as it might produce a lot of log messages. |
Components
Overview
DOT Android Document provides both non-UI and UI components. Non-UI components are aimed to be used by developers who want to build their own UI using the DOT Android Document functionality. UI components are build on top of non-UI components. These are available as abstract fragments and can be extended and then embedded into the application’s existing activity providing more control.
List of Non-UI Components
- DOCUMENT DETECTOR
A component for performing document detection on an image.
- IMAGE PARAMETERS ANALYZER
A component for computing image parameters such as sharpness, brightness or hotspots score.
- IMAGE PERSPECTIVE WARPER
A component for perspective warping an image according detected document position.
- DOCUMENT AUTO CAPTURE CONTROLLER
A component for capturing good quality images suitable for optical character recognition.
- MACHINE READABLE ZONE READER
A component for reading Machine Readable Zone (MRZ).
List of UI Components
- DOCUMENT AUTO CAPTURE
A visual component for capturing good quality images suitable for optical character recognition.
Non-UI Components
Document Detector
The DocumentDetector
interface provides a document detection functionality.
Create a DocumentDetector
:
val documentDetector = DocumentDetectorFactory.create()
To perform detection, call the following method on the background thread:
val document = documentDetector.detect(bgraRawImage)
Image Parameters Analyzer
The ImageParametersAnalyzer
interface provides an image parameters analysis functionality.
Create ImageParametersAnalyzer
:
val imageParametersAnalyzer = ImageParametersAnalyzerFactory.create()
To perform analysis, call the following method on the background thread:
val imageParameters = imageParametersAnalyzer.analyze(bgraRawImage)
Image Perspective Warper
The ImagePerspectiveWarper
interface provides perspective warping functionality.
Create ImagePerspectiveWarper
:
val imagePerspectiveWarper = ImagePerspectiveWarperFactory.create()
To perform perspective warping, call the following method on the background thread:
val warpedBgraRawImage = imagePerspectiveWarper.warp(bgraRawImage, detectionPosition, targetImageSize)
Document Auto Capture Controller
The DocumentAutoCaptureController
interface provides a stateful document auto capture functionality.
Create DocumentAutoCaptureController
:
val configuration = DocumentAutoCaptureController.Configuration(
context = context,
validators = validators,
//…
)
val documentAutoCaptureController = DocumentAutoCaptureControllerFactory.create(configuration)
You can use detectionNormalizedRectangle
to specify the region in the input image which will be used for document detection. For example, if you want to ignore top 30% and bottom 30% of the input image, you can do it as follows:
val configuration = DocumentAutoCaptureController.Configuration(
context = context,
validators = validators,
detectionNormalizedRectangle = RectangleDouble(0.0, 0.3, 1.0, 0.7),
//…
)
If detectionNormalizedRectangle
is not specified, the source input image is used for document detection.
To capture a good quality document image, repeatedly call the process()
method using the camera frames:
val processingResult = documentAutoCaptureController.process(bgraRawImage, timestampMillis)
The controller evaluates the image requirements for each frame. Once there are minValidFramesInRowToStartCandidateSelection
valid frames in a row, candidate selection is started with duration of candidateSelectionDurationMillis
milliseconds. After the candidate selection is finished, the best document image candidate is returned and the document auto capture process is over.
Machine Readable Zone Reader
The MrzReader
interface provides a Machine Readable Zone (MRZ) reading functionality.
Create MrzReader
:
val configuration = MrzReader.Configuration(context)
val mrzReader = MrzReaderFactory.create(configuration)
To read a MRZ, call the following method on the background thread:
val result = mrzReader.read(bgraRawImage, document)
Or, alternatively if you know the travel document type call this method in order to increase precision of reading:
val result = mrzReader.read(bgraRawImage, document, travelDocumentType)
Argument document
is a product of either Document Detector component, Document Auto Capture Controller component or Document Auto Capture UI component.
The result of successful MRZ reading contains travel document type and machine readable zone. If MRZ reading was not successful, the result will contain an exception and travelDocumentType
and/or machineReadableZone
may be null
.
UI Components
Fragment Configuration
Components containing UI are embedded into the application as fragments from Android Support Library. All fragments are abstract. They must be subclassed and override their abstract methods.
Fragments requiring runtime interaction provide public methods, for example start()
.
class DemoDocumentAutoCaptureFragment : DocumentAutoCaptureFragment() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
start()
}
//…
}
The DocumentAutoCaptureFragment
requires a configuration. To provide configuration data, you should override the provideConfiguration()
method in your subclass implementation. This method should return an instance of the DocumentAutoCaptureFragment.Configuration
data class with the desired parameters.
class DemoDocumentAutoCaptureFragment : DocumentAutoCaptureFragment() {
override fun provideConfiguration() = Configuration(
cameraFacing = CameraFacing.BACK,
cameraPreviewScaleType = CameraPreviewScaleType.FIT,
//…
)
//…
}
Camera permission
A fragment (UI component) will check the camera permission (Manifest.permission.CAMERA
) right before the camera is started. If the camera permission is granted the fragment will start the camera. If the camera permission is not granted the fragment will use Android API - ActivityResultContracts.RequestPermission to request the camera permission. Android OS will present the system dialog to the user of the app. If the user explicitly denies the permission at this point, onNoCameraPermission()
callback is called. Implement this callback in order to navigate the user further in your app workflow.
Orientation Change
In order to handle the orientation change in multi-window mode correctly, configure the activity in your AndroidManifest.xml
file as follows:
<activity
android:name=".MyActivity"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation" />
Document Auto Capture
The fragment with instructions for obtaining quality document images suitable for further processing.
In order to configure the behaviour of DocumentAutoCaptureFragment
, use DocumentAutoCaptureFragment.Configuration
(see Fragment Configuration).
To use the fragment, create a subclass of DocumentAutoCaptureFragment
and override appropriate callbacks.
To start the document auto capture process call the start()
method. You can start the process any time.
In case you want to handle detection data, implement onProcessed()
callback. This callback is called with each processed camera frame. When the document auto capture process finishes successfully, the result will be returned via the onCaptured()
callback.
In case you want to force the capture event, call the requestCapture()
method. The most recent image will be returned via the onCaptured()
callback asynchronously.
Call start()
method again in case you need to start over the document auto capture process (e.g. you want to capture both sides of the document, one after another). You can also call start()
method to stop and start over ongoing process as well.
In case you want to stop the document auto capture process prematurely, call the stopAsync()
method. The callback in the method argument indicates that the processing is over.
Quality Attributes of the Output Image
You may adjust quality requirements for the output image. To perform this, you can use pre-defined instances - QualityAttributeThresholds
- from QualityAttributeThresholdPresets
with recommended thresholds and pass it to DocumentAutoCaptureFragment.Configuration
by setting the qualityAttributeThresholds
. You can also create your own instance of QualityAttributeThresholds
from scratch or based on pre-defined instances according to your needs.
Possible ways how to create QualityAttributeThresholds
:
// The standard preset
val standard = QualityAttributeThresholdPresets.standard
// Modified thresholds based on the standard preset
val modified = standard.copy(
minConfidence = minConfidence,
minSharpness = null,
)
// Custom thresholds
val custom = QualityAttributeThresholds(
minConfidence = minConfidence,
minSharpness = null,
)
Available presets (pre-defined instances with thresholds) in QualityAttributeThresholdPresets
:
standard
- The resulting image suitable for evaluation on Digital Identity Service. See the thresholds.
Customization of UI components
Strings
You can override the string resources in your application and provide alternative strings for supported languages using the standard Android localization mechanism.
<string name="dot_document_auto_capture_instruction_brightness_too_high">Less light needed</string>
<string name="dot_document_auto_capture_instruction_brightness_too_low">More light needed</string>
<string name="dot_document_auto_capture_instruction_candidate_selection">Hold still…</string>
<string name="dot_document_auto_capture_instruction_document_does_not_fit_placeholder">Center document</string>
<string name="dot_document_auto_capture_instruction_document_not_detected">Scan document</string>
<string name="dot_document_auto_capture_instruction_document_out_of_bounds">Center document</string>
<string name="dot_document_auto_capture_instruction_hotspots_score_too_high">Avoid reflections</string>
<string name="dot_document_auto_capture_instruction_mrz_not_present">Scan valid machine readable document</string>
<string name="dot_document_auto_capture_instruction_mrz_not_valid">Scan valid machine readable document</string>
<string name="dot_document_auto_capture_instruction_sharpness_too_low">More light needed</string>
<string name="dot_document_auto_capture_instruction_size_too_small">Move closer</string>
Colors
You may customize the colors used by DOT Android Document in your application. To use custom colors, override the specific color.
<color name="dot_detection_layer">#ffffffff</color>
<color name="dot_instruction_background">#fff8fbfb</color>
<color name="dot_instruction_candidate_selection_background">#ff00bfb2</color>
<color name="dot_instruction_candidate_selection_text">#ff131313</color>
<color name="dot_instruction_text">#ff131313</color>
<color name="dot_placeholder">#ffffffff</color>
<color name="dot_placeholder_candidate_selection">#ff00bfb2</color>
<color name="dot_placeholder_overlay">#80131313</color>
Styles
Text views and buttons can be styled by overriding the parent style in the application.
<style name="TextAppearance.Dot.Medium" parent="TextAppearance.AppCompat.Medium" />
<style name="TextAppearance.Dot.Medium.Instruction" />
Common Classes
ImageSize
DTO which represents a size of an image. To create an instance:
val imageSize = ImageSize(width, height)
BgraRawImage
DTO which represents and an image. To create an instance:
val bgraRawImage = BgraRawImage(size, bytes)
To create an instance from Bitmap
:
val bgraRawImage = BgraRawImageFactory.create(bitmap)
DetectionPosition
DTO which represents a position of a detected document. To create an instance:
val detectionPosition = DetectionPosition(topLeft, topRight, bottomRight, bottomLeft)
Security guidelines
Our video injection prevention feature relies heavily on following established security best practices as outlined in the Android Developer website’s Security guidelines. Specifically, the App Integrity and Networking sections provide crucial foundations for this functionality. The Play Integrity API ensures your app binary remains unaltered, preventing potential vulnerabilities that could be exploited for video injection. Networking Security guidelines help secure communication channels. These guidelines help prevent unauthorized modification of data streams. By adhering to these security principles, you create a robust environment where our video injection prevention features can function optimally, safeguarding you from tampered content.
OWASP Mobile Application Security
We also strongly recommend following the OWASP Mobile Application Security guidelines. The OWASP Mobile Application Security (MAS) flagship project provides a security standard for mobile apps (OWASP MASVS) and a comprehensive testing guide (OWASP MASTG) that covers the processes, techniques, and tools used during a mobile app security test, as well as an exhaustive set of test cases that enables testers to deliver consistent and complete results.
Appendix
Changelog
8.5.2 - 2024-10-30
Fixed
MRZ parsing issue.
8.5.1 - 2024-10-28
Fixed
Stability issue in UI components.
8.5.0 - 2024-10-24
Added
Property
DocumentAutoCaptureFrameParameters.detectionAreaImageSize
.
Fixed
Detection normalized rectangle was not calculated correctly in specific scenarios within the Document Auto Capture UI component.
8.4.0 - 2024-09-11
Technical release. No changes.
8.3.3 - 2024-09-05
Technical release. No changes.
8.3.2 - 2024-09-05
Technical release. No changes.
8.3.1 - 2024-08-16
Fixed
Stability issue in UI components.
8.3.0 - 2024-08-08
Technical release. No changes.
8.1.0 - 2024-07-08
Changed
Document detection is improved (UI Document Auto Capture, Document Auto Capture Controller, Document Detector).
Sharpness calculation is improved (UI Document Auto Capture, Document Auto Capture Controller, Image Parameters Analyzer).
8.0.0 - 2024-06-27
Added
Class
CheckDigit
.
Changed
Class
ElementWithChecksum
toElementWithCheckDigit
.Class
DateElementWithChecksum
toDateElementWithCheckDigit
.Property
ElementWithChecksum.validChecksum
toElementWithCheckDigit.checkDigit
.Property
DateElementWithChecksum.validChecksum
toDateElementWithCheckDigit.checkDigit
.Property
Td1MachineReadableZone.validChecksum
toTd1MachineReadableZone.compositeCheckDigit
.Property
Td2MachineReadableZone.validChecksum
toTd2MachineReadableZone.compositeCheckDigit
.Property
Td3MachineReadableZone.validChecksum
toTd3MachineReadableZone.compositeCheckDigit
.Property
NameElement.primaryElement
toNameElement.primaryIdentifier
.Property
NameElement.secondaryElement
toNameElement.secondaryIdentifier
.Method signature
DocumentDetector.detect()
.Class
DocumentDetector.Result
toDocumentDetector.Document
.Property
DocumentDetector.Result.corners
toDocumentDetector.Document.position
.Class
Corners
toDetectionPosition
.Property
DocumentAutoCaptureDetection.documentDetectorResult
toDocumentAutoCaptureDetection.document
.Property
DocumentAutoCaptureDetection.imageParameters
toDocumentAutoCaptureDetection.document.imageParameters
.Property
DocumentAutoCaptureResult.documentDetectorResult
toDocumentAutoCaptureResult.document
.Property
DocumentAutoCaptureResult.imageParameters
toDocumentAutoCaptureResult.document.imageParameters
.Property
DocumentAutoCaptureFrameParameters.documentDetectorResult
toDocumentAutoCaptureFrameParameters.document
.Property
DocumentAutoCaptureFrameParameters.imageParameters
toDocumentAutoCaptureFrameParameters.document.imageParameters
.Property
DocumentAutoCaptureFragment.Configuration.torchEnabled
toDocumentAutoCaptureFragment.Configuration.isTorchEnabled
.Class
MachineReadableZone
and containing data classes. Mainly only package is changed of those classes.Method signature
ImagePerspectiveWarper.warp()
.Method signature
MrzReader.read()
.Layout resource
fragment_document_auto_capture.xml
todot_document_fragment_document_auto_capture.xml
.
Removed
Callback
DocumentAutoCaptureFragment.onCandidateSelectionStarted()
.Property
DocumentAutoCaptureController.Configuration.imageParametersNormalizedRectangle
. This property has no use anymore since the image parameters are calculated from the detection area.
7.5.8 - 2024-06-19
Fixed
Minor UI issue with updating the background color of the instruction.
Stability issue in UI components.
7.5.7 - 2024-06-04
Technical release. No changes.
7.5.6 - 2024-06-04
Technical release. No changes.
7.5.5 - 2024-05-30
Technical release. No changes.
7.5.4 - 2024-05-14
Added
Security guidelines section to the integration manual.
7.5.3 - 2024-04-26
Technical release. No changes.
7.5.2 - 2024-04-25
Removed
Permission
android.permission.INTERNET
from Android manifest.
7.5.1 - 2024-04-15
Added
Section about optimization of application size to the integration manual.
Fixed
Rare UI issue in detection layer in
FILL
scale type on some devices.
7.5.0 - 2024-04-03
Added
Constructor of
QualityAttributeThresholds
.Method
DocumentAutoCaptureFragment.provideConfiguration()
.Class
DocumentAutoCaptureFragment.Configuration
.Class
DocumentAutoCaptureController.Configuration
.Class
MrzReader.Configuration
.Property
QualityAttributeThresholdPresets.standard
(originalQualityAttributeThresholdPresets.standard
property was renamed toQualityAttributeThresholdPresets.standardBuilder
).Callback
onStopped
as an argument to methodDocumentAutoCaptureFragment.stopAsync()
.
Changed
Property
QualityAttributeThresholdPresets.standard
toQualityAttributeThresholdPresets.standardBuilder
.Deprecated
QualityAttributeThresholds.Builder
, useQualityAttributeThresholds
constructor instead.Deprecated
QualityAttributeThresholdPresets.standardBuilder
, useQualityAttributeThresholdPresets.standard
.Deprecated
DocumentAutoCaptureControllerConfiguration
, useDocumentAutoCaptureController.Configuration
class instead.Deprecated
DocumentAutoCaptureControllerConfiguration.Builder
, useDocumentAutoCaptureController.Configuration
class instead.Deprecated
DocumentAutoCaptureControllerFactory.create(DocumentAutoCaptureControllerConfiguration)
, useDocumentAutoCaptureControllerFactory.create(DocumentAutoCaptureController.Configuration)
instead.Deprecated
DocumentAutoCaptureConfiguration
, useDocumentAutoCaptureFragment.Configuration
instead.Deprecated
DocumentAutoCaptureConfiguration.Builder
, useDocumentAutoCaptureFragment.Configuration
instead.Deprecated
DocumentAutoCaptureFragment.CONFIGURATION
, overrideDocumentAutoCaptureFragment.provideConfiguration()
method to provide configuration instead.Deprecated
MrzReaderConfiguration.Builder
, useMrzReader.Configuration
instead.Deprecated
MrzReaderConfiguration
, useMrzReader.Configuration
instead.Deprecated
MrzReaderFactory.create(MrzReaderConfiguration)
, useMrzReaderFactory.create(MrzReader.Configuration)
instead.Enum
DocumentAutoCaptureConfiguration.PlaceholderType
toPlaceholderType
.
Removed
Method
DocumentAutoCaptureFragment.onStopped()
. UseDocumentAutoCaptureFragment.stopAsync()
method argumentonStopped
instead.
7.4.2 - 2024-04-02
Fixed
Proguard rules.
7.4.0 - 2024-03-18
Added
Enum
DocumentAutoCaptureConfiguration.PlaceholderType
Method
DocumentAutoCaptureConfiguration.Builder.placeholderType()
.
7.3.0 - 2024-02-23
Added
Permission
android.permission.INTERNET
in Android manifest.
7.2.2 - 2024-02-07
Technical release. No changes.
7.2.1 - 2024-02-05
Added
Property
REQUIRE_SECURE_ENV
with value1
under the<application>
in Android manifest.
7.2.0 - 2023-12-28
Changed
Camera preview and image analysis resolution selection strategy in UI components for
FILL
scale type.
7.1.0 - 2023-12-14
Added
Property
DocumentAutoCaptureDetection.imageParameters
.Property
DocumentAutoCaptureResult.imageParameters
.
7.0.2 - 2023-12-05
Technical release. No changes.
7.0.1 - 2023-11-21
Technical release. No changes.
7.0.0 - 2023-11-02
Added
Class
DotSdk
.Class
DotSdkConfiguration
.Interface
DotLibrary
.License file is required. To obtain one, please contact
support@innovatrics.com
.
Changed
Class
DotDocumentLibrary
reworked.Machine Readable Zone reading accuracy is improved.
6.5.2 - 2023-10-20
Fixed
API availability issue.
6.5.1 - 2023-10-19
Fixed
Stability issue.
MRZ parsing issue.
6.5.0 - 2023-10-04
Added
Method
DocumentAutoCaptureConfiguration.Builder.mrzValidation()
.Enum
MrzValidation
.String resource
dot_document_auto_capture_instruction_mrz_not_present
.Class
MrzNotPresentValidator
.Class
MrzRecognitionResult
.Property
MrzReader.Result.rawLines
.Property
DocumentAutoCaptureFrameParameters.mrzRecognitionResult
.
Changed
Property
DocumentAutoCaptureFrameParameters.machineReadableZone
toDocumentAutoCaptureFrameParameters.mrzRecognitionResult
.Performance of document detection is significantly improved.
Accuracy of document detection is improved.
Deprecated
Method
DocumentAutoCaptureConfiguration.Builder.mrzReadingEnabled()
.
Removed
Property
DocumentAutoCaptureControllerConfiguration.isMrzReadingEnabled
. Is determined by the validators whether the MRZ should be read.
6.4.0 - 2023-09-20
Changed
Signature of
DocumentAutoCaptureController.process()
method.
6.3.1 - 2023-08-21
Fixed
Stability issue.
6.3.0 - 2023-08-17
Fixed
UI state after configuration change.
Preview and image resolution in UI components on some devices.
6.2.1 - 2023-07-27
Technical release. No changes.
6.2.0 - 2023-07-26
Added
Method
DocumentAutoCaptureConfiguration.Builder.sessionToken()
.Method
DocumentAutoCaptureControllerConfiguration.Builder.sessionToken()
.
6.1.0 - 2023-07-07
Added
Method
DocumentAutoCaptureConfiguration.Builder.torchEnabled()
.
Fixed
Duplicate classes from
com.google.protobuf
package.
6.0.0 - 2023-06-14
Added
Method
DocumentAutoCaptureConfiguration.qualityAttributeThresholds()
.Object
QualityAttributeThresholdPresets
.Property
DocumentAutoCaptureResult.content
.
Changed
All methods in
QualityAttributeThresholds.Builder()
accept nullable arguments.
Removed
Method
DocumentAutoCaptureConfiguration.startQualityAttributeThresholds()
. UseDocumentAutoCaptureConfiguration.qualityAttributeThresholds()
instead.
5.5.1 - 2023-06-06
Fixed
UI state after components are finished.
5.5.0 - 2023-04-26
Technical release. No changes.
5.4.2 - 2023-04-04
Fixed
Stability issue.
5.4.1 - 2023-03-28
Technical release. No changes.
5.4.0 - 2023-03-24
Technical release. No changes.
5.3.0 - 2023-03-20
Added
Property
DocumentAutoCaptureController.ProcessingResult.phase
.Enum
Phase
.
Changed
Method
DocumentAutoCaptureFragment.start()
(re)starts the process any time during the lifecycle of the component.
Removed
Property
DocumentAutoCaptureController.ProcessingResult.events
. Use propertyDocumentAutoCaptureController.ProcessingResult.phase
instead.Enum
DocumentAutoCaptureController.ProcessingResult.Event
.Method
DocumentAutoCaptureController.restart()
. Create new instance ofDocumentAutoCaptureController
instead.Method
DocumentAutoCaptureFragment.restart()
. UseDocumentAutoCaptureFragment.start()
instead.
5.2.0 - 2023-03-07
Technical release. No changes.
5.1.0 - 2023-02-06
Changed
Minimum Kotlin Gradle plugin version to 1.6.0.
5.0.0 - 2023-01-30
Changed
New SDK versioning: All libraries (DOT Document, DOT Face, DOT Face Lite and DOT NFC) are released simultaneously with a single version name. Libraries with the same version name work correctly at build time and at run time.
DocumentAutoCaptureResult.bgraRawImage
now contains full camera image, instead of cropped image.DocumentAutoCaptureFragment
: MethodonDetected()
renamed toonProcessed()
.Method
DocumentAutoCaptureController.process()
.Class
BrightnessHighValidator
renamed toBrightnessTooHighValidator
.Class
BrightnessLowValidator
renamed toBrightnessTooLowValidator
.Class
HotspotsScoreHighValidator
renamed toHotspotsScoreTooHighValidator
.Class
SharpnessLowValidator
renamed toSharpnessTooLowValidator
.Class
SizeSmallValidator
renamed toSizeTooSmallValidator
.String resource
dot_document_auto_capture_instruction_document_not_present
todot_document_auto_capture_instruction_document_not_detected
.String resource
dot_document_auto_capture_instruction_document_centering
todot_document_auto_capture_instruction_document_out_of_bounds
.String resource
dot_document_auto_capture_instruction_document_too_far
todot_document_auto_capture_instruction_size_too_small
.String resource
dot_document_auto_capture_instruction_hotspots_present
todot_document_auto_capture_instruction_hotspots_score_too_high
.Minimum Kotlin Gradle plugin version to 1.7.0.
Added
Method
DocumentAutoCaptureFragment.stopAsync()
.Method
DocumentAutoCaptureFragment.onStopped()
.Property
DocumentAutoCaptureDetection.bgraRawImage
.Property
DocumentAutoCaptureDetection.travelDocumentType
.Property
DocumentAutoCaptureDetection.machineReadableZone
.Class
DocumentAutoCaptureController.ProcessingResult
.String resource
dot_document_auto_capture_instruction_document_does_not_fit_placeholder
.
Removed
DocumentAutoCaptureControllerConfiguration.Builder
: MethodonDetectionListener()
.DocumentAutoCaptureControllerConfiguration.Builder
: MethodonCandidateSelectionStartListener()
.DocumentAutoCaptureControllerConfiguration.Builder
: MethodonCaptureListener()
.Interface
DocumentAutoCaptureController.OnDetectionListener
.Interface
DocumentAutoCaptureController.OnCandidateSelectionStartListener
.Interface
DocumentAutoCaptureController.OnCaptureListener
.Method
DocumentAutoCaptureController.requestCapture()
.Deprecated API.
3.7.2 - 2022-12-16
Fixed
Stability issue in image conversion.
3.7.1 - 2022-12-15
Fixed
Proguard rules.
3.7.0 - 2022-10-28
Added
Property
DocumentAutoCaptureDetectionValidator.dependencyIdentifiers
.Method
DocumentAutoCaptureConfiguration.startQualityAttributeThresholds()
.Class
QualityAttributeThresholds
.
Changed
DocumentAutoCaptureControllerConfiguration.Builder()
throws anIllegalArgumentException
.Deprecated method
DocumentAutoCaptureConfiguration.Builder.confidenceLowThreshold()
.Deprecated method
DocumentAutoCaptureConfiguration.Builder.sizeSmallThreshold
.Deprecated method
DocumentAutoCaptureConfiguration.Builder.sharpnessLowThreshold()
.Deprecated method
DocumentAutoCaptureConfiguration.Builder.brightnessLowThreshold()
.Deprecated method
DocumentAutoCaptureConfiguration.Builder.brightnessHighThreshold()
.Deprecated method
DocumentAutoCaptureConfiguration.Builder.hotspotsScoreHighThreshold()
.
3.6.2 - 2022-10-18
Changed
Target Android API level to 33.
Fixed
Document detection accuracy.
Compatibility with latest DOT libraries.
3.6.1 - 2022-08-18
Fixed
Stability issue in Document Auto Capture UI component.
3.6.0 - 2022-08-18
Added
Method
MachineReadableZone.getLines()
.
Fixed
Minor UI issues in Document Auto Capture UI component.
3.5.0 - 2022-07-06
Added
Method
DotDocumentLibrary.getVersionName()
.
Changed
Update CameraX to 1.1.0.
Minimum Kotlin Gradle plugin version to 1.6.0.
Fixed
Machine Readable Zone Reader: Parsing long document number and optional data together.
Machine Readable Zone Reader: Parsing element value with more than one filler in the middle.
3.4.1 - 2022-05-31
Fixed
Stability issue in
BgraRawImageFactory
.
3.4.0 - 2022-05-18
Changed
Target Android API level to 32.
Design of Document Auto Capture UI component.
Rename all color resources.
3.3.3 - 2022-03-09
Fixed
Camera preview resolution selection.
3.3.2 - 2022-02-17
Fixed
Bind the camera to the fragment lifecycle instead of the activity in UI components.
3.3.1 - 2022-02-14
Fixed
Preview overlay in the Document Auto Capture UI component.
3.3.0 - 2022-01-11
Added
Method
DocumentAutoCaptureConfiguration.Builder.validationMode()
.Method
DocumentAutoCaptureConfiguration.Builder.sizeSmallThreshold()
.Method
DocumentAutoCaptureConfiguration.Builder.detectionLayerVisible()
.Enum
ValidationMode
.Class
DocumentOutOfBoundsValidator
.Color resource
dot_document_auto_capture_detection_layer
.Color resource
dot_document_auto_capture_instruction_candidate_selection_background
.Color resource
dot_document_auto_capture_instruction_text
.Color resource
dot_document_auto_capture_overlay
.
Changed
Document detection accuracy improved.
Validator threshold
SharpnessLowValidator.DEFAULT_THRESHOLD
to0.65
.Validator threshold
DocumentNotDetectedValidator.DEFAULT_THRESHOLD_CONFIDENCE
to0.9
.Validator threshold
DocumentDoesNotFitPlaceholderValidator.DEFAULT_THRESHOLD_PENALTY
to0.035
.Class
DocumentSmallValidator
toSizeSmallValidator
.Improved UX of instruction changing in Document Auto Capture.
DocumentAutoCaptureConfiguration.Builder
: MethodconfidenceThreshold()
renamed toconfidenceLowThreshold()
.Redesign of the UI of Document Auto Capture component.
Rename color resource
dot_document_auto_capture_placeholder_capturing
todot_document_auto_capture_placeholder_candidate_selection
.
Removed
Class
DocumentLargeValidator
.String resource
dot_document_auto_capture_instruction_document_too_close
.Dimension resource
dot_document_auto_capture_placeholder_dash_path_effect_interval
.Dimension resource
dot_document_auto_capture_placeholder_stroke_width
.
3.2.0 - 2021-11-29
Changed
Target Android API level to 31.
Improve
DocumentDoesNotFitPlaceholderValidator
.Validator threshold
DocumentDoesNotFitPlaceholderValidator.DEFAULT_THRESHOLD_DETECTED_TO_PLACEHOLDER_CORNERS_DISTANCE
toDocumentDoesNotFitPlaceholderValidator.DEFAULT_THRESHOLD_PENALTY
.
3.1.0 - 2021-11-05
Added
Callback
DocumentAutoCaptureFragment.onDetected()
.Callback
DocumentAutoCaptureFragment.onCandidateSelectionStarted()
.
Changed
Validator threshold
DocumentNotDetectedValidator.DEFAULT_THRESHOLD_CONFIDENCE
to0.6
.
3.0.2 - 2021-10-08
Fixed
Restarting the Document Auto Capture UI component.
3.0.1 - 2021-10-06
Fixed
Image conversion in
BgraRawImageFactory.create(Bitmap)
.
3.0.0 - 2021-09-27
Added
Machine Readable Zone Reader component (
MrzReader
,MrzReaderConfiguration
andMrzReaderFactory
).Image Perspective Warper component (
ImagePerspectiveWarper
andImagePerspectiveWarperFactory
).Class
DocumentDetectorFactory
.Class
ImageParametersAnalyzerFactory
.Class
DocumentAutoCaptureControllerConfiguration
.Class
DocumentAutoCaptureControllerFactory
.Class
DocumentAutoCaptureDetection
.Class
Corners
.Class
BgraRawImageFactory
.Class
BitmapFactory
.
Changed
groupId
com.innovatrics.android
tocom.innovatrics.dot
.Minimum Android API level to 21.
Class
DocumentAutoCaptureArguments
toDocumentAutoCaptureConfiguration
.Method
DocumentAutoCaptureController.detect()
toDocumentAutoCaptureController.process()
.Class
DocumentAutoCaptureController.OnStayStillPhaseEnterListener
toDocumentAutoCaptureController.OnCandidateSelectionStartListener()
.Class
DetectionResult
toDocumentDetector.Result
.Class
Point
toPointDouble
.Method
DocumentAutoCaptureController.onPhotoCaptured()
toDocumentAutoCaptureController.onCaptured()
.Method
DocumentAutoCaptureController.postCaptureRequest()
toDocumentAutoCaptureController.requestCapture()
.Class
DetectedDocument
toDocumentAutoCaptureResult
.Performance of document detection is significantly improved.
Removed
Interface
DocumentAutoCaptureFrameParametersEvaluator
.Class
DefaultDocumentAutoCaptureFrameParametersEvaluator
.Method
DocumentAutoCaptureFragment.onCameraAccessFailed()
.Method
DocumentAutoCaptureFragment.onCameraInitFailed()
.Class
PlaceholderEvaluatorFactory
.Method
DocumentAutoCaptureController.onAutoCaptureReady()
.Enum
DocumentAutoCaptureHint
.
2.3.1 - 2021-06-17
Fixed
Requesting camera permission if it is already denied.
2.3.0 - 2021-05-14
Added
DocumentAutoCaptureArguments.Builder
: MethodconfidenceThreshold()
.DocumentAutoCaptureArguments.Builder
: MethodsharpnessLowThreshold()
.DocumentAutoCaptureArguments.Builder
: MethodbrightnessLowThreshold()
.DocumentAutoCaptureArguments.Builder
: MethodbrightnessHighThreshold()
.DocumentAutoCaptureArguments.Builder
: MethodhotspotsScoreHighThreshold()
.BrightnessHighValidator.Builder
: Methodthreshold()
.BrightnessLowValidator.Builder
: Methodthreshold()
.DocumentDoesNotFitPlaceholderValidator.Builder
: MethoddetectedToPlaceholderCornersDistanceThreshold()
.DocumentLargeValidator.Builder
: MethoddocumentWidthToImageWidthRatioThreshold()
.DocumentNotDetectedValidator.Builder
: MethodconfidenceThreshold()
.DocumentSmallValidator.Builder
: MethoddocumentWidthToImageWidthRatioThreshold()
.HotspotsScoreHighValidator.Builder
: Methodthreshold()
.SharpnessLowValidator.Builder
: Methodthreshold()
.
Changed
All
DocumentAutoCaptureFrameParametersValidator
implementations: Instance creation via aBuilder
.PlaceholderEvaluatorFactory
: Instance creation via aBuilder
.
2.2.1 - 2021-03-29
Added
Support for
x86
andx86_64
architectures.
2.2.0 - 2021-03-17
Changed
Update documentation.
Fixed
Configuration change issue in Document Auto Capture UI component.
2.1.0 - 2021-01-25
Added
Callback
DocumentAutoCaptureFragment.onAutoCaptureReady()
.Method
DocumentAutoCaptureFragment.start()
.
Changed
DocumentAutoCaptureFragment
: Auto Capture process is not started implicitly. Client needs to call methodDocumentAutoCaptureFragment.start()
to start the process.DocumentAutoCaptureFragment
: As soon as the photo is captured all views are reset.
2.0.1 - 2021-01-21
Fixed
Issue in method
DocumentAutoCaptureFragment.restart()
.
2.0.0 - 2021-01-11
Added
Possibility to restart the Document Auto Capture Controller component (method
DocumentAutoCaptureController.restart()
).Possibility to restart the Document Auto Capture UI component (method
DocumentAutoCaptureFragment.restart()
).New non-UI component: Image Parameters Analyzer.
DefaultDocumentAutoCaptureController.Builder
: MethoddetectionFrame()
.DefaultDocumentAutoCaptureController.Builder
: MethodimageParametersFrame()
.HotspotsScoreHighValidator
for validating hotspots presence.
Changed
Update target Android SDK version to 30 (Android 11).
DetectionResult
DTO does not containsharpness
andbrightness
anymore (these are present inImageParameters
DTO).DefaultDocumentAutoCaptureController.Builder
: MethoddetectionResultEvaluator()
renamed todocumentAutoCaptureFrameParametersEvaluator()
.DetectionResultEvaluator
renamed toDocumentAutoCaptureFrameParametersEvaluator
.DefaultDetectionResultEvaluator
renamed toDefaultDocumentAutoCaptureFrameParametersEvaluator
.DetectionAttributeValidator
renamed toDocumentAutoCaptureFrameParametersValidator
.DetectionHint
renamed toDocumentAutoCaptureHint
.Update documentation.
Removed
DocumentDetector
: MethodDetectionResult detectDocument(Nv21Image nv21Image)
.DefaultDocumentAutoCaptureController.Builder
: MethodcroppingFrame()
.
1.1.0 - 2020-11-25
Added
Possibility to force capture in Document Auto Capture Controller component (method
DocumentAutoCaptureController.requestCapture()
).Possibility to force capture in Document Auto Capture UI component (method
DocumentAutoCaptureFragment.postCaptureRequest()
).
Changed
Update documentation.
Fixed
Proguard rules.
1.0.0 - 2020-07-31
Changed
Preview image is cropped before document detection (placeholder area and margin).
Document Auto Capture design.
Update documentation.
Fixed
Fix camera preview freezing.
Placeholder position calculation for
cameraPreviewScaleType
:ScaleType.CENTER_CROP
.
0.3.0 - 2020-07-13
Minor changes.
0.2.0 - 2020-07-11
Changed
Update documentation.
0.1.0 - 2020-07-10
Added
First release.