Skip to content

Installation on Android

How to install Document Reader SDK.

Overview

graph LR
  A(Document Reader SDK) --> B(API);
  A --> C(Core);
  B --> D(Common);
  A -.- E[(Database)];

Document Reader SDK consists of two frameworks: API and Core.

API framework provides the external interface for controlling the process and getting the result. It depens on the Common framework that is an interface for working with the camera and other modules that are used in other Regula SDKs.

Core framework provides the recognition functionality where all the processing happens. This is the internal framework, it is used by the API framework only and is not accessible for developers. However, it should be referenced in the project.

Database contains the documents' data. It's mandatory to have it if you use the Core type that supports document type recognition.

Requirements

Installation

Gradle

URL

Add the following lines to the settings.gradle file:

settings.gradle
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        google()
        mavenCentral()
        jcenter()
        maven {
            url "https://maven.regulaforensics.com/RegulaDocumentReader"
        }
    }
}

Dependencies

1. Add the API and Core libraries as dependencies and make sure transitive is set to true for API. To always use the latest release, simply add the following lines of code to the build.gradle file of your project:

build.gradle
1
2
3
4
implementation 'com.regula.documentreader.core:fullrfid:+@aar'
implementation ('com.regula.documentreader:api:+@aar'){
    transitive = true
}

Alternatively, you can pin to a specific version (e.g. 1.0.0):

build.gradle
1
2
3
4
implementation 'com.regula.documentreader.core:fullrfid:1.0.0@aar'
implementation ('com.regula.documentreader:api:1.0.0@aar'){
    transitive = true
}

2. Sync the project.

Manual Integration

1. Go to our Maven repository.

2. Download the latest Document Reader API version.

3. Find the .pom file there, open it, and check the version of the Common API.

4. Download that Common API version.

5. Download one of the Document Reader Core libraries depending on the functionality that you need and the license capabilities.

6. Copy the downloaded files to the libs folder located at the root directory of your project. If there is no such a folder, create it.

7. Add the libs directory to the settings.gradle:

settings.gradle
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        google()
        mavenCentral()
        jcenter()
        flatDir {
            dirs 'libs'
        }
    }
}

8. Add the downloaded files to the app level build.gradle file of your project, for example:

build.gradle
1
2
3
4
5
dependencies {
    implementation(name:'api-6.4.7224', ext:'aar')
    implementation(name:'api-6.4.1048', ext:'aar')
    implementation(name:'fullrfid-6.4.7188', ext:'aar')
}

9. Sync the project.

Core Types

There is a variety of the Core framework types, each has different features included.

Find the list of available features in the table below.

Feature Description
Visual zone OCR Optical character recognition of the document visual zone text fields based on document templates included in the database.
Document type identification Automatic recognition of the document type: no need to manually select a country, document type, and series for processing.
MRZ OCR Reading and parsing the machine readable zone lines into separate fields.
Barcode recognition Reading the 1D and 2D (PDF417, QR, Aztec, Datamatrix) barcodes and automatic parsing into text fields using included document template specifications. Can be performed only if the template database is available and the document type is identified.
Document location Detecting the document boundaries and cropping out the document from the supplied picture.
Graphics cropping Cropping graphic fields, such as a photo portrait and signature, based on templates included in the database.
RFID chip processing Reading data from electronic contactless chips of ePassport, eID, and eDL using NFC hardware, if present.
Security features check For each document type, certain secutiry checks can be performed. For example, UV dull paper check, image patterns (VIS), IR transparency, etc. You can find the security checks by document types in the Documents list (Download Documents list)

The size of the Core framework depends on the features included, so choose the one that suits your case the best to optimize the size of your application.

build.gradle
implementation 'com.regula.documentreader.core:fullrfid:+@aar'

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

build.gradle
implementation 'com.regula.documentreader.core:full:+@aar'

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

build.gradle
implementation 'com.regula.documentreader.core:ocrandmrz:+@aar'

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

build.gradle
implementation 'com.regula.documentreader.core:mrz:+@aar'

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

build.gradle
implementation 'com.regula.documentreader.core:barcode:+@aar'

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

build.gradle
implementation 'com.regula.documentreader.core:fullauthrfid:+@aar'

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

build.gradle
implementation 'com.regula.documentreader.core:barcodemrz:+@aar'

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

build.gradle
implementation 'com.regula.documentreader.core:mrzrfid:+@aar'

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

build.gradle
implementation 'com.regula.documentreader.core:doctype:+@aar'

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

build.gradle
implementation 'com.regula.documentreader.core:ocrandmrzrfid:+@aar'

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

build.gradle
implementation 'com.regula.documentreader.core:barcodemrzrfid:+@aar'

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

build.gradle
implementation 'com.regula.documentreader.core:fullauth:+@aar'

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

build.gradle
implementation 'com.regula.documentreader.core:bounds:+@aar'

Features:

  • Visual zone OCR
  • Document type identification
  • MRZ OCR
  • Barcode recognition
  • Document location
  • Graphics cropping
  • RFID chip processing
  • Checking security features

Notes:

Info

If you are not sure yet which Core type to choose, consider the fullrfid one. You will be able to get back and change your decision at any moment.

Next Steps