Getting started
Docutain SDK Dependencies
The Docutain Barcode Scanner SDK for Android is distributed through Maven repositories, so make sure you have added mavenCentral()
in your settings.gradle
file:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
If you are using old syntax for specifying repositories, make sure that mavenCentral()
is added in your top level build.gradle
file:
allprojects {
repositories {
google()
mavenCentral()
}
}
Afterwards, you can add the dependency to your build.gradle
file:
def docutainBarcodeSdkVersion = '1.0.0.5'
implementation("de.docutain:Docutain-SDK-Barcode:$docutainBarcodeSdkVersion")
CompileSdk
The compileSdk
of your app needs to be set to 34
or greater. Note that updating the compileSdk
(which allows newer APIs to be used) can be done seperately from updating targetSdk
and minSdk
. So this should have no negative impact on your app.
Android Gradle Plugin
To run the Docutain SDK on Android, your projects needs to have AGP (Android Gradle Plugin) Version 8.0.2
or higher.
If you are currently using an AGP version lower than 8.0.2, you need to upgrade to at least 8.0.2. We recommend to do this with Android Studio. Open the native Android project of your Flutter project with Android Studio and use the AGP Upgrade Assistant.
More details on upgrading AGP
Camera Permission
Declare the following permission in your AndroidManifest.xml
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera"/>
Runtime permission for camera is handled automatically by the Docutain SDK.