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
  • Example XML implementation
  • Method
  • Implementation example
  1. Face Engine

Camera Helper

The android SDK also provides a camera object based on a library from google, to help test and implement facial verifications without our liveness engine.

Example XML implementation

It is required from the developer to create a basic view where the liveness detection surface will be shown.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <FrameLayout
        android:id="@+id/camera_surface"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

</RelativeLayout>

Method

BiometridAuthFace.getInstance().startCamera(
  int id,
  Orientation orientation, 
  AuthFaceCallback context
 );

Implementation example

public class ExampleActivity extends Activity 
            implements AuthFaceCallback{

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

        BiometridAuthFace.getInstance().startCamera(
            R.id.camera_surface, 
            Orientation.Front, 
            this
        );
    }

    @Override
    public void onPictureTaken(boolean status, String filepath) {
        if(status){
            Log.i("filepath", filepath);
        }
    }

    ...
}
PreviousFace VerificationNextVoice Engine

Last updated 6 years ago