Legacy Android SDK
2.2.1
2.2.1
  • Introduction
  • Requirements
  • Downloading
  • Setup
  • Initialization
    • Network Security Settings
  • User Management
    • Create User
    • User status
    • Delete engine enrol
    • Delete User
  • Face Engine
    • Liveness Detection
      • Liveness Customisation
    • Face Verification
    • Camera Helper
  • Voice Engine
    • Initialization
    • Audio Recording
    • Recording Submission
  • Document Engine
    • Validate document
    • Validate entity
  • Enums
Powered by GitBook
On this page
  • Method
  • Callback
  • Implementation example
  1. Face Engine

Face Verification

With or without the liveness engine, it's possible to enrol and verify an end-user with our face matching engine.

Method

BiometridAuthFace.getInstance().analyzeFace(
    String biometrid_id, 
    String path, 
    SessionType session, 
    AuthFaceCallback context
);

analyzeFace

method

String biometrid_ id

id corresponding the biometric user

String path

absolute path to file

SessionType session

Biometrid session

AuthFaceCallback context

Applicational context

This method is responsible for the analyze of all the individual photos sent to the API. The results will be represented on the callback as shown on the example below.:

Callback

@Override
public void analyzeFaceCallback(boolean b, SessionType sessionType, FaceResponseStatus response, JSONObject jsonObject, Errors errors) {
    if(!status && errors != null) {
          Log.e("error", error.getMessage());
    }
    else {
        Log.i("current session", session.getName());
        Log.i("absolute path", path);
    }
}

analyzeFaceCallback

callback

boolean status

Response status

SessionType session

Biometrid session

FaceResponseStatus response

Enum containing all possible outcomes

JsonObject jsonObject

Full response from the api

AuthFaceCallback context

Applicational context

Implementation example

public class ExampleActivity extends Activity 
        implements AuthFaceCallback {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_example);

       BiometridAuthVoice.getInstance().analyzeFace(
           "biometrid_id",
           "path to file",
           SessionType.Enroll
           this
       );
    }

    @Override
    public void analyzeFaceCallback(boolean status, SessionType sessionType, FaceResponseStatus response, JSONObject jsonObject, Errors errors) {
    if(!status && serrors != null) {
          Log.e("error", error.getMessage());
    }
    else {
        Log.i("current session", session.getName());
        Log.i("absolute path", path);
    }  

    ...
}
PreviousLiveness CustomisationNextCamera Helper

Last updated 4 years ago

For more information on this method please check our api

documentation