FaceLiveness

Enables you to integrate live facial verification and fingerprint authentication technology into your Android applications, offering a seamless and secure way to authenticate users.

Current Version

Requirements

  • Minimum Android SDK API version: minSdk 21 (Android 5 Lollipop)

  • Android SDK API version to compile: compileSdk 34

To publish your app on the Google Play Store, you must complete a data safety form. Since we integrate with the FingerPrintJS SDK, you'll need to provide the following information:

SDK Dependencies

FaceLiveness leverages the following external SDKs:

These dependencies are easily managed through Gradle and are bundled with the SDK for ease of installation.

Runtime permissions

Installation

If your version of Gradle is earlier than 7, add these lines to your build.gradle.

allprojects {
  repositories {
  ...
  maven { url 'https://repo.combateafraude.com/android/release' }
  maven { url 'https://raw.githubusercontent.com/iProov/android/master/maven/' }
  maven { url 'https://maven.fpregistry.io/releases' }
  maven { url 'https://jitpack.io' }

}}

If your version of Gradle is 7 or newer, add these lines to your settings.gradle.

dependencyResolutionManagement {
    repositories {
        ...
        maven { url 'https://repo.combateafraude.com/android/release' }
        maven { url 'https://raw.githubusercontent.com/iProov/android/master/maven/' }
        maven { url 'https://maven.fpregistry.io/releases' }
        maven { url 'https://jitpack.io' }
    }
}

Add support for Java 8 to your build.gradle file. Skip this step if Java 8 is enabled.

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

Add the SDK version to the dependencies section in your build.gradle file

dependencies {
    implementation 'com.combateafraude.sdk:new-face-liveness:{version}'
}

Instantiating the SDK

First, create an object of type FaceLiveness. This object is for you to configure all your business rules:

FaceLiveness faceLiveness = new FaceLiveness.Builder(String mobileToken)
    //see table below
    .build();

Builder method

Consulting a policy

To authenticate a user, use the .startSDK() method. You must enter the user's CPF, your app's Context and a VerifyLivenessListener object.

Parameters

Example

faceLiveness.startSDK(Context context, String personId, new VerifyLivenessListener() {
    @Override
    public void onSuccess(FaceLivenessResult faceLivenessResult) {
        
    }

    @Override
    public void onError(SDKFailure sdkFailure) {
        
    }

    @Override
    public void onCancel() {
        
    }

    @Override
    public void onLoading() {
        
    }

    @Override
    public void onLoaded() {
        
    }
});

VerifyLivenessListener options

FaceLivenessResult

Success

Signedresponse params

The isAlive parameter is VERY IMPORTANT, based on this validation, the user can be guided to continue the flow or not. In case of isAlive: true, it would be able to continue with the journey. If isAlive: false, this user is not valid and should be prevented from continuing their journey.

Error

SDKFailure

ErrorType

Last updated

Logo

2023 © Caf. - All rights reserved