CafSDK

Welcome to the documentation for CafSDK, a unified and modular Android SDK that provides robust solutions for document detection and face liveness validation.



Overview

CafSDK is a comprehensive Android SDK that integrates two primary functionalities:

  • Document Detection: Powered by the DocumentDetector framework and TensorFlow Lite.

  • Face Liveness Validation: Offered via the CafFaceLiveness module, which supports both iProov and FaceTec 2D providers. These providers can be used independently or in combination, giving you the flexibility to tailor the solution to your needs.

This unified approach allows developers to include only the necessary modules, reducing bloat and simplifying integration.


Features

  • Modularity: Integrate the full SDK or select individual components.

  • Ease of Integration: Using BoM (bill of material) for version management ensures compatibility between SDKs, avoiding conflicts and speeding up integration and use.

  • Security and Accuracy: Leverages advanced frameworks (e.g., TensorFlow Lite, iProov, FaceTec) for robust document and face validation.


Requirements

Requirement
Version

Minimum Android SDK API version (minSdk)

26

Android SDK API version to compile (compileSDK)

34

Kotlin version

1.9.10

Gradle version

8.4

Android Gradle Plugin (AGP) version

8.3.2


Installation

Gradle Configuration

Add these lines to your settings.gradle.

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://repo.combateafraude.com/android/release") }
        maven { url = uri("https://raw.githubusercontent.com/iProov/android/master/maven/") }
        maven { setUrl("https://maven.fpregistry.io/releases") }
        maven { setUrl("https://jitpack.io") }
    }
}

Java 8 Compatibility

If Java 8 is not enabled, add support to your build.gradle:

android {
    ...
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

Adding SDK Dependency

Include the FaceLiveness SDK in your build.gradle dependencies:

dependencies {
    // Declare Bill of Material dependency.
    implementation(platform("io.caf.sdk:caf-sdk-bom:1.2.0"))

    // Select which SDK you can use.
    implementation("io.caf.sdk:document-detector")
    // implementation("io.caf.sdk:caffaceliveness-lite")
}

Usage

Documentation:

DocumentDetectorCafFaceLiveness

Module Architecture

The unified CafSDK is organized into several modular components:

  • CafSDK: The umbrella module for core functionalities.

  • DocumentDetector: Provides secure document detection using TensorFlow Lite.

  • CafFaceLiveness: Manages face liveness validation.

Last updated