Mobbeel for developers

Mobbeel for developers

  • MobbScan
  • MobbID
  • MobbSign
  • Clients
  • FAQ

›Getting Started

MobbScan Android SDK

  • Configure MobbScan Android SDK

Getting Started

  • Getting started with MobbScan
  • Detect and scan a document in two different calls
  • Detect and scan MRZ
  • Detect and scan a PDF417
  • Scanning documents with NFC
  • Error Handling

Additional configuration

  • Configure the detection process
  • Perform face matching with MobbScan
  • Select images returned by a scan
  • Fix scan orientation
  • Record a video while user performs a scan
  • Adding a video step
  • Configure Play Store distribution

MobbScan UI customization

  • Customize MobbScan Default Interfaces
  • Customize MobbScan document scan UI
  • Customize MobbScan MRZ scan UI
  • Customize Unattended Process UI
  • Customize feedback messages

MobbScan-Agent configurations

  • Getting the verification result

Migration Guides

  • Migration 2.25.x to 2.26.x
  • Migration 2.24.x to 2.25.x
  • Migration to 2.24.x
  • Migration to 2.22.x
  • Migration 2.19.x to 2.21.x
  • Migration 2.18.x to 2.19.x
  • Migration 2.13.x to 2.14.x

Information

  • Changelog
  • API Reference

Detect and scan MRZ

You can use this feature to detect and scan a Machine Readable Zone (MRZ). All official ID cards and Passports complying with ICAO 9303 standard contain this section from which it is possible to retrieve most of personal data without the need to indicate the particular ID type or issuing state beforehand. By using this method, we will be able to scan and get information from worldwide documents.

This option is included on the SDK so no extra configuration is required apart from the basic MobbScan configuration.

MRZ detection and scan

This mode will detect the MRZ of a document, validate it to confirm it is a valid MRZ, extract the information of the MRZ and return the image of the document. Follow the next steps in order to correctly perform the process.

Note: To start the MRZ detection and scan, you should have done the startScan method to get the scanId previously. If you don't know how to do this, please visit the getting started guide. Keep in mind that the document type you have to use now is a IDDocumentMRZ.

1. Create the ScanOperation method

In order to scan information based on the MRZ of the document you will have to create a ScanOperation instance. This class has a builder with all the information required for the scan that is going to be performed.

Kotlin
Java
val validations: arrayListOf(ResultIDCard.FIELD_VALIDATION_MRZ_MANDATORY_DATA_VALIDATION)
val scanOperation = ScanOperationMRZ.Builder()
.scanId(YOUR_SCAN_ID)
.timeout(TIMEOUT)
.scanMrzMode(ScanOperationMRZ.SCAN_MRZ_MODE.FORCE_CROPPED_DOCUMENT)
.listValidation(validations)
.build()
List<String> validations = new ArrayList<>();
validations.add(ResultIDCard.FIELD_VALIDATION_MRZ_MANDATORY_DATA_VALIDATION);
ScanOperation scanOperation = new ScanOperationMRZ.Builder()
.scanId(YOUR_SCAN_ID)
.timeout(TIMEOUT)
.scanMrzMode(ScanOperationMRZ.SCAN_MRZ_MODE.FORCE_CROPPED_DOCUMENT)
.listValidation(validations)
.build();

This object if composed by the following attributes:

AttributeDescription
ScanIDScan identifier obtained from the start scan method.
TimeoutAfter the detection and validation of the MRZ of the document, the process will obtain the image of the document. There is a chance that the system might not be able to validate the MRZ of the document. Tf this is the case, you can set a timeout to stop trying to validate the MRZ and return the document image without the validation of the MRZ.
ScanMRZModeAfter the validation has been completed or the timeout has been reached, an image of the document will be returned. This mode sets the way the document is returned. Check the differences here.
ListValidationsList of validations to perform over the MRZ of the document to consider it a valid MRZ. You can check the possibilites here.

2. Make the MobbScanAPI call with the ScanOperation

Once we have the ScanOperation instance that will configure the process, we can perform the MobbScanAPI call as follows:

Kotlin
Java
MobbScanAPI.getInstance().scan(scanOperation, { result, resultData, error ->
// Your document detection listener code here
}) { result, resultData, error ->
// Your document scan listener code here
}
MobbScanAPI.getInstance().scan(scanOperation, new IDDocumentDetectionListener() {
@Override
public void onIDDocumentDetected(MobbScanDetectionResult result, MobbScanDetectionResultData resultData, MobbScanAPIError error) {
// Your document detection listener code here
}
}, new IDDocumentScanListener() {
@Override
public void onIDDocumentScanned(MobbScanScanResult result, MobbScanScanResultData resultData, MobbScanAPIError error) {
// Yous document scan listener code here
}
});

Note: If you want extra information about the listeners used in this method, you can take a look to the ones used on the default document scan, as they are the same ones.

Document detection with MRZ validation

If in your use case you only want to detect the document and you do not want to perform a scan, this option will return an image of the document with the MRZ validation performed.

1. Create the ScanOperation method

As seen at MRZ detection and scan you have to create the ScanOperation method to configure the process. Please check the previous create the ScanOperation method.

2. Make the MobbScanAPI call with the ScanOperation

In this case, the method you have to use is the one that follows:

Kotlin
Java
MobbScanAPI.getInstance().scan(scanOperation, { result, resultData, error ->
// Your document detection listener code here
})
MobbScanAPI.getInstance().scan(scanOperation, new IDDocumentDetectionListener() {
@Override
public void onIDDocumentDetected(MobbScanDetectionResult result, MobbScanDetectionResultData resultData, MobbScanAPIError error) {
// Your document detection listener code here
}
});

Note: If you want extra information about the listeners used in this method, you can take a look at the ones used on the default document scan, since they are the same ones.

Scan MRZ Modes

This mode will configure how the image of the document will be returned. The options are:

Scan mrz modedescription
SCAN_MRZ_MODE.DEFAULTThe document in not cropped in any way, it will return the whole camera frame.
SCAN_MRZ_MODE.WITH_CROPPED_DOCUMENTMobbScan will try to crop the document from the frame where the MRZ was detected. If the action was not successful, it will return the whole camera frame.
SCAN_MRZ_MODE.FORCE_CROPPED_DOCUMENTMobbScan will force the document detection. This will always return a cropped document.

MRZ validations

It is possible to setup customized conditions for the MRZ scan depending on the kind of data required. By default, these are the fields that must be validated before stopping the MRZ scanning process and notify this situation back:

Note: the MRZ detection process will always check that both name and surname are not null.

Here is the list (listValidations) with all required fields that the scanning process will validate before returning a succesful result. By default, the name and the surname will always be checked and validated as non null values. All these validations are accesible from the ScanOperationMRZ class.

The optional validations are the following ones:

validationdescription
VALIDATION_MRZ_CHECK_DATE_OF_BIRTHChecks that the date of birth is correct according to the checkdigit
VALIDATION_MRZ_CHECK_DATE_OF_EXPIRYChecks that the document's date of expiry is correct according to the checkdigit
VALIDATION_MRZ_CHECK_DOCUMENT_NUMBERChecks that the document number is correct according to the checkdigit
VALIDATION_MRZ_CHECK_PERSONAL_NUMBERChecks that the personal number is correct according to the checkdigit if it is available
VALIDATION_GENDERChecks that the gender has a correct value
VALIDATION_ISSUING_STATEChecks that the issuing state is correct according to the ISO 3166-1 Alpha-3
VALIDATION_NATIONALITYChecks that the issuing state is correct according to the ISO 3166-1 Alpha-3
VALIDATION_PERSONAL_NUMBER_FORMATChecks that the format of the personal number is correct according to the ISO 3166-1 Alpha-3
VALIDATION_DOCUMENT_NUMBER_FORMATChecks that the format of the document number is correct according to the ISO 3166-1 Alpha-3
VALIDATION_DATE_OF_BIRTHChecks that the date of birth is correct according to the checkdigit
VALIDATION_DATE_OF_EXPIRYChecks that the date of expiry is correct according to the checkdigit

Scan only mandatory data

The MRZ is structured in mandatory and optional areas. The optional ones can be used by each issuing state to include customized information (personal number, SSN code...)m and non-standar checkdigit calculation methods are also allowed. If you want to obviate optional areas while performing a scan, add to listValidations this validation:

ResultIDCard.FIELD_VALIDATION_MRZ_MANDATORY_DATA_VALIDATION
← Detect and scan a document in two different callsDetect and scan a PDF417 →
  • MRZ detection and scan
    • 1. Create the ScanOperation method
    • 2. Make the MobbScanAPI call with the ScanOperation
  • Document detection with MRZ validation
    • 1. Create the ScanOperation method
    • 2. Make the MobbScanAPI call with the ScanOperation
  • Scan MRZ Modes
  • MRZ validations
    • Scan only mandatory data
Mobbeel for developers
Product Documentation
MobbIDMobbScanMobbSign
Connect
LinkedInFacebookX
More
FAQContact Us
Mobbeel Solutions SL
Copyright © 2025 Mobbeel Solutions SL