Getting started

This section introduces the first steps to run our Android SDKs. If you have questions or suggestions, tell us!

Terms & Policies

When using our SDKs, please make sure that you agree with our Privacy Policy and our Terms and Conditions of Use.

Latest versions

Stable

SDKDependency

com.combateafraude.sdk:document-detector:8.0.2

com.combateafraude.sdk:new-face-liveness:3.0.0

com.combateafraude.sdk:new-face-authenticator:3.0.0

Compatibility

SettingsMinimum version

minSdk

21

compileSdk

33

Java

8

Deprecated

SDKDependency

com.combateafraude.sdk:passive-face-liveness:5.25.12

com.combateafraude.sdk:face-authenticator:5.9.0

com.combateafraude.sdk:address-check:4.0.0

You can find code examples of our deprecated SDKs on our Github.

Compatibility

SettingsMinimum version

minSdk

21

compileSdk

33

Java

8

Project settings

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.

Importing the SDKs

Remotely

To import our SDKs, add our maven repository to your project-level build.gradle:

allprojects {
    repositories {
        ...
        maven { url 'https://repo.combateafraude.com/android/release' }
        //to implement SDK's FaceLiveness and FaceAuthenticator you also have to include these:
        maven { url 'https://raw.githubusercontent.com/iProov/android/master/maven/' }
        maven { url 'https://maven.fpregistry.io/releases' }
        maven { url 'https://jitpack.io' }
    }
}

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' }
        //to implement SDK's FaceLiveness and FaceAuthenticator you also have to include these:
        maven { url 'https://raw.githubusercontent.com/iProov/android/master/maven/' }
        maven { url 'https://maven.fpregistry.io/releases' }
        maven { url 'https://jitpack.io' }
    }
}

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}'
}

ProGuard settings

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.** { *; }

R8 / PROGUARD

  • If you are using R8 the shrinking and obfuscation rules are included automatically.

  • ProGuard users must manually add the options from retrofit2.pro.

  • You might also need rules for OkHttp and Okio which are dependencies of this library.

Last updated

Logo

2023 © Caf. - All rights reserved