Getting started
This section introduces the first steps to run our Android SDKs. If you have questions or suggestions, tell us!
When using our SDKs, please make sure that you agree with our Privacy Policy and our Terms and Conditions of Use.
SDK | Dependency |
---|---|
com.combateafraude.sdk:document-detector:6.39.0 | |
com.combateafraude.sdk:passive-face-liveness:5.25.12 | |
com.combateafraude.sdk:face-authenticator:5.8.13 | |
com.combateafraude.sdk:address-check:4.0.0 |
SDK | Dependency |
---|---|
com.combateafraude.sdk:passive-face-liveness:6.0.0-rc02 | |
com.combateafraude.sdk:face-authenticator:5.8.5-rc01 |
Settings | Minimum version | Reason |
---|---|---|
minSdkVersion | 21 | - According to google, it covers 94% of the world's Android devices - Document detection algorithm has API 21 as minimum version |
compileSdkVersion | 32 | |
Java version | 8 | Lambda functions |
Add these settings to your app-level
build.gradle
:android {
...
// Enable Data Binding, depending on the version of com.android.tools.build:gradle
// If com.android.tools.build:gradle >= 4
buildFeatures {
dataBinding = true
}
// If com.android.tools.build:gradle < 4
dataBinding.enabled = true
// Java 1.8 compatibility, allowing lambda functions
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
// Required only for DocumentDetector
aaptOptions {
noCompress "tflite"
}
}
As our SDKs activities use Data Binding, it is required that you enable this setting within your app. The
compileOptions
setting is required for SDK's built-in lambda functions, which were released in Java 8. The noCompress
setting tells the compiler not to compress files with the .tflite
extension used in the DocumentDetector.To import our SDKs, add our maven repository to your project-level
build.gradle
:buildscript {
...
}
allprojects {
repositories {
...
maven { url 'https://repo.combateafraude.com/android/release' }
}
}
If you are using the Gradle 7+ version, add our maven repository inside the
dependencyResolutionManagement
method in the settings.gradle
file, instead of the build.gradle
:dependencyResolutionManagement {
repositories {
...
maven { url 'https://repo.combateafraude.com/android/release' }
}r
}
After that, add the SDK dependency you want to use in your app to the app-level
build.gradle
:dependencies {
...
implementation 'com.combateafraude.sdk:{sdkName}:{sdkVersion}'
}
1. Download the
.aar
and .pom
corresponding files from our repository to directly add the transitive SDK dependencies to your project.This is necessary as the
.aar
file does not carry transitive dependencies. To download, access the following URL, replacing {sdkName}
and {sdkVersion}
corresponding to the SDK you want to use: https://repo.combateafraude.com/android/release/com/combateafraude/sdk/{sdkName}/{sdkVersion}/{sdkName}-{sdkVersion}.aar
2. Add the
.aar
file to the path <project_folder>/app/libs
.3. In your app-level
build.gradle
add the libs
folder as a dependency repository, add the .aar
file downloaded earlier in step 1 and all transitive dependencies in your app's dependencies:android {
...
}
dependencies {
...
implementation '{packageName}:{fileName}@aar'
// implement the other SDK transitive dependencies
}
repositories {
flatDir {
dirs 'libs'
}
}
If you use ProGuard or a similar tool that includes shrink or obfuscation rules in your project, you may need to add these exceptions for our SDKs to work properly.
-keep class com.combateafraude.** { *; }
-keep interface com.combateafraude.** { *; }
-keepclassmembers class com.combateafraude.** { *; }
Last modified 9d ago