Skip to main content

Getting started

Docutain SDK Dependencies

The Docutain Barcode Scanner SDK for Android is distributed through Maven repositories which you have to specify in your top-level build.gradle file:

allprojects {
repositories {
google()
//release versions of the Docutain SDK
mavenCentral()
//Snapshot versions of the Docutain SDK
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
}
}
caution

If you are using dependencyResolutionManagement with RepositoriesMode.FAIL_ON_PROJECT_REPOS in your settings.gradle file, make sure you have added the Docutain SDK repositories only in this specific block (instead of using allprojects repositories block in the build.gradle file):

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
//release versions of the Docutain SDK
mavenCentral()
//Snapshot versions of the Docutain SDK
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
}
}

Afterwards, you can add the dependency to your build.gradle file:

def docutainBarcodeSdkVersion = '1.0.0.4'
implementation("de.docutain:Docutain-SDK-Barcode:$docutainBarcodeSdkVersion")

Android Manifest

Camera Permission

Declare the following permission in your AndroidManifest.xml

<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera"/>
info

Runtime permission for camera is handled automatically by the Docutain SDK.