Skip to content

Installation

How to install Document Reader SDK.

Requirements

The following tools should be installed:

The minimum API Level is 21.

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 library as a dependency and make sure transitive is set to true. For this, simply add the following lines of code to the build.gradle file of your project:

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

To use the specific version, use the following lines, e.g. 1.0.0:

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

2. Add one of the Core libraries depending on the functionality that you need and the license capabilities. To always use the latest release, add the following line:

build.gradle
implementation 'com.regula.documentreader.core:fullrfid:+@aar'
build.gradle
implementation 'com.regula.documentreader.core:full:+@aar'
build.gradle
implementation 'com.regula.documentreader.core:ocrandmrz:+@aar'
build.gradle
implementation 'com.regula.documentreader.core:mrz:+@aar'
build.gradle
implementation 'com.regula.documentreader.core:barcode:+@aar'
build.gradle
implementation 'com.regula.documentreader.core:barcodemrz:+@aar'
build.gradle
implementation 'com.regula.documentreader.core:mrzrfid:+@aar'
build.gradle
implementation 'com.regula.documentreader.core:doctype:+@aar'
build.gradle
implementation 'com.regula.documentreader.core:ocrandmrzrfid:+@aar'
build.gradle
implementation 'com.regula.documentreader.core:barcodemrzrfid:+@aar'
build.gradle
implementation 'com.regula.documentreader.core:bounds:+@aar'

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

build.gradle
implementation 'com.regula.documentreader.core:fullrfid:1.0.0@aar'
build.gradle
implementation 'com.regula.documentreader.core:full:1.0.0@aar'
build.gradle
implementation 'com.regula.documentreader.core:ocrandmrz:1.0.0@aar'
build.gradle
implementation 'com.regula.documentreader.core:mrz:1.0.0@aar'
build.gradle
implementation 'com.regula.documentreader.core:barcode:1.0.0@aar'
build.gradle
implementation 'com.regula.documentreader.core:barcodemrz:1.0.0@aar'
build.gradle
implementation 'com.regula.documentreader.core:mrzrfid:1.0.0@aar'
build.gradle
implementation 'com.regula.documentreader.core:doctype:1.0.0@aar'
build.gradle
implementation 'com.regula.documentreader.core:ocrandmrzrfid:1.0.0@aar'
build.gradle
implementation 'com.regula.documentreader.core:barcodemrzrfid:1.0.0@aar'
build.gradle
implementation 'com.regula.documentreader.core:bounds:1.0.0@aar'

3. 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.