LogoLogo
Useful links
  • Home
  • Product guides
  • API
  • SDKs
  • Overview
  • First steps
  • ANDROID
    • Getting Started with the SDK
    • Standalone Modules
      • Document Detector
        • Release Notes
        • Current Version
        • Requirements
        • Gradle Dependencies
        • Gradle Source Code
        • Setting up the SDK
          • Setting properties
          • Capture Stages
          • Messages Settings
          • Customization
          • Security Settings
          • Detection Steps
          • Upload Mode
          • Advanced Settings
            • Proxy configuration
            • Preview configuration
        • Start Document Detection
        • Source Code
        • Google security form
        • Reduce SDKs size
        • SDKs response
        • References
        • FAQ
      • Face Liveness
        • Release Notes
        • Current Version
        • Requirements
        • Gradle Dependencies
        • Gradle Source Code
        • SDK Lifecycle
        • Building the SDK
        • Start Liveness Verification
        • Source Code
        • References
        • Advanced Features
        • FAQ
      • Face Authenticator
        • Release Notes
      • Smart Auth
        • Release Notes
        • Current Version
        • Requirements
        • Gradle Dependencies
        • Gradle Source Code
        • Permissions
        • SDK Lifecycle
        • Building the SDK
        • Start Smart Authentication
        • Source Code
        • References
        • FAQ
      • Face Liveness (deprecated)
        • Release Notes
  • iOS
    • Getting Started with the SDK
    • Standalone Modules
      • Document Detector
        • Release Notes
        • Current Version
        • Requirements
        • Installing the SDK
        • Setting up the SDK
          • Setting properties
          • Messages Settings
          • Customization
          • Detection Steps
          • Upload Mode
          • Advanced Settings
            • Proxy configuration
            • Preview configuration
        • Start Document Detection
        • References
        • FAQ
      • Face Liveness
        • Release Notes
        • Installation
        • Current Version
        • Requirements
        • SDK Lifecycle
        • Building the SDK
        • Start Liveness Verification
        • Source Code
        • References
        • FAQ
      • Face Authenticator
        • Release Notes
        • Installation
        • Current Version
        • Requirements
        • Building the SDK
        • Start the SDK
        • References
        • FAQ
      • Smart Auth
        • Release Notes
        • Installation
        • Current Version
        • Requirements
        • SDK Lifecycle
        • Building the SDK
        • Start Smart Authentication
        • Source Code
        • References
        • FAQ
      • Face Liveness (deprecated)
        • Release Notes
  • REACT NATIVE
    • Standalone Modules
      • Document Detector
        • Release Notes
        • Current Version
        • Requirements
        • Installation
        • Hooks
        • Start Document Verification
        • Source Code
        • TypeScript References
        • Customizing Style
        • FAQ
      • Face Liveness
        • Release Notes
        • Current Version
        • Requirements
        • Installation
        • Hooks
        • Start Liveness Verification
        • Source Code
        • TypeScript References
        • FAQ
      • Face Authenticator
        • Release Notes
        • Current Version
        • Requirements
        • Installation
        • Hooks
        • Start Authentication Verification
        • Source Code
        • TypeScript References
        • FAQ
      • Smart Auth
        • Getting started
        • Release notes
        • Using Native Modules
          • Requirements
          • Gradle Source Code
          • Podfile Source Code
          • Native Module Android
          • Native Module iOS
          • Import Native Modules
          • Source Code
          • TypeScript References
          • FAQ
        • Using Expo Modules
          • Requirements
          • Create Local Expo Module
          • Gradle Source Code
          • Podspec Source Code
          • Native Module Android
          • Native Module iOS
          • Import Expo Modules
          • Source Code
          • TypeScript References
          • FAQ
  • WEB (JAVASCRIPT)
    • Standalone Modules
      • Document Detector
        • Getting started
        • SDK builder options
          • Analytics
          • Appearance
          • Messages
        • SDK methods
        • Event listeners
        • Customization
        • Release notes
      • Face Liveness
        • Customization
        • Release notes
      • Face Authenticator
        • Customization
        • Release notes
      • Smart Auth
        • SDK errors
        • Customization
        • Release notes
LogoLogo

2025 © Caf. - All rights reserved

On this page
  • Current Version
  • Requirements
  • SDK Dependencies
  • Transitive dependencies
  • Runtime permissions
  • Installation
  • Instantiating the SDK
  • Builder method
  • Consulting a policy
  • Parameters
  • Example
  • VerifyAuthenticationListener options
  • FaceAuthenticatorResult
  • Success
  • FaceAuthenticationErrorResult
  1. ANDROID
  2. Standalone Modules

Face Authenticator

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

Current Version

Name
Version

FaceAuthenticator

4.1.1

Requirements

  • Minimum Android SDK API version: minSdk 26 (Android 8 Oreo)

  • 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:

Question in Google Play Console's data safety form
Response

Does your app collect or share any of the required user data types?

Yes.

What type of data is collected?

Device or other identifiers.

Is this data collected, shared, or both?

Collected.

Is this data processed ephemerally?

Yes.

Why is this user data collected?

Fraud Prevention, Security, and Compliance.

versionName and versionCode are mandatory for the SDK to work correctly.

SDK Dependencies

FaceAuthenticator leverages the following external SDKs:

SDK
Version

FaceLiveness

4.1.1

Transitive dependencies

SDK
Version

iProov Biometrics Android

9.1.2

Fingerprint Pro Android

2.7.0

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

Runtime permissions

Permission
Reason
Required

CAMERA

Capturing the selfie in policies with facial re-authentication

Yes

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/patch912/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/patch912/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 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 'io.caf.sdk:new-face-authenticator:{version}'
}

Instantiating the SDK

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

FaceAuthenticator faceAuthenticator = new FaceAuthenticator.Builder(String mobileToken)
    //see table below
    .build();

Builder method

Parameter
Required

String mobileToken

Yes

.setStage(CAFStage stage)

Used to redirect the SDK to the desired stage in caf api. The method takes as parameter an enum CafStage to select the environment:

  • CAFStage.PROD set production environment.

  • CAFStage.BETA set beta environment.

No. The default is CAFStage.PROD

.setFilter(Filter filter)

Used to change the SDK filter, that has the following options:

  • Filter.NATURAL

  • Filter.LINE_DRAWING

No, the default is LINE_DRAWING

.setEnableScreenshots(boolean bool)

Used to enable screenshots during the SDK scan. Disabled by default for security reasons.

No, the default is false

.setLoadingScreen(boolean bool)

Used to enable a default loading progressbar during loading events. You can set your customized loading screen instead, using the onLoading method below.

No, the default is false

.setImageUrlExpirationTime(Time time)

Used to customize the image URL expiration time, that has the following options:

  • Time.THREE_HOURS

  • Time.THIRTY_DAYS

No, the default is null

Consulting a policy

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

Parameters

Parameter
Required

String personId

User CPF

Yes

Context context

Your app Context

Yes

VerifyAuthenticationListener listener

Response Listener

Yes

Example

faceAuthenticator.authenticate(Context context, String personId, new VerifyAuthenticationListener() {
    @Override
    public void onSuccess(FaceAuthenticatorResult result) {
        
    }

    @Override
    public void onError(FaceAuthenticatorErrorResult errorResult) {
        
    }

    @Override
    public void onCancel() {
        
    }

    @Override
    public void onLoading() {
        
    }

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

VerifyAuthenticationListener options

Method
Description

onSuccess

The execution has ended with success, you have to use the result and check for the results of the SDK.

onError

The execution has ended with error, you have to use the result and check for the error results of the SDK.

onCancel

The execution has been cancelled by the user.

onLoading

The SDK is loading, you can use this method to set a action in your app, for example a loading.

onLoaded

The SDK is not loading anymore, you can use this method to set a action in your app, for example, you can stop your previous loading.

FaceAuthenticatorResult

Success

Return
Reason

String signedResponse

Signed response from the CAF server confirming that the captured selfie has a real face. This parameter is used to get an extra layer of security, checking that the signature of the response is not broken, or caused by request interception. If it is broken, there is a strong indication of request interception.

Signedresponse params

Event
Description

requestId

Request identifier.

isAlive

Validation of a living person, identifies whether the user passed successfully or not.

isMatch

Face match validation result.

token

Request token.

userId

User identifier provided for the request.

imageUrl

Temporary link to the image, generated by our API.

personId

User identifier provided for the SDK.

sdkVersion

Sdk version in use.

iat

Token expiration.

message

Return message.

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. Furthermore, the isMatch parameter indicates whether the Face Match passed successfully or not, returning isMatch: true in case of success and false in case of failure.

FaceAuthenticationErrorResult

Return
Reason

String description

Error description.

ErrorType errorType

Return the type of the error.

ErrorType

type
Description

CAMERA_PERMISSION

Indicates that the device does not have permission to access the camera. This error typically occurs when the user denies access to the camera or if the app lacks the necessary permissions.

NETWORK_EXCEPTION

Indicates a network-related error occurred. This error may occur due to various network issues such as a lack of internet connection, server timeouts, or network congestion.

SERVER_EXCEPTION

Indicates an exception occurred on the server-side.<br. />This error is typically returned when there is an issue with the server processing the facial recognition request. This could include server-side errors, misconfigurations, or service interruptions.

TOKEN_EXCEPTION

Indicates an issue with the provided token. This error may occur if the provided authentication token is invalid, expired, or lacks the necessary permissions to perform facial recognition tasks.

UNSUPPORTED_DEVICE

Indicates that the device is not supported. This error may occur if the device hardware or software does not meet the minimum requirements for facial recognition functionality.

Last updated 1 day ago

: Enables the integration of live facial verification and fingerprint authentication technology.

: Enables the integration of live facial verification technology.

: Provides fingerprint authentication capabilities to enhance security features in your app.

Usage token associated with your Identity account (see how to get it ).

FaceLiveness Android
iProov Biometrics Android
Fingerprint Pro Android
here