Legacy On Android SDK
1.7.0
1.7.0
  • Introduction
  • Overview
    • Requirements
    • Prerequisites
    • Downloading
    • Setup
    • Initialization
      • Custom headers
    • BiometridOn
      • Create process
      • Get current step
      • Get previous step
      • Get remaining steps
      • Get completed steps
      • Get process data
      • Submit form
      • Submit file
      • Submit selfie with ID card
      • Submit form with files
      • Submit multiple files
      • Submit ID document
      • Video conference
    • Liveness Detection
      • Basic detection
      • Liveness Customisation
      • Generate Liveness Surface
  • Enums
    • StepType
    • VideoConferenceState
    • Doctype
Powered by GitBook
On this page
  • Callback params
  • Implementation example
  1. Overview
  2. Liveness Detection

Basic detection

No data submission

BiometridOn liveness detection surface acts on an isolated environment and its represented as a fragment that can be added on any activity.

To initialise the detection process:

BiometridOn.getInstance().startLivenessDetection(String token, LivenessCustomisation customisation, Context context);

After the detection process terminates a temporary file containing a specific frame of the capture is return. In most cases this file is used for submission during a Selfie submission step.

Callback params

submitIdCard Callback

Callback

Boolean status

Status of validation

String filepath

File path

Errors e

Errors object

Implementation example

public class ExampleActivity extends Activity implements OnLivenessCallback {
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_example);

        LivnessCustomisarion customisation = new LivenessCustomisation();
        
        customization.setViewId(R.id.liveness_surface);
        customization.setPublicKey("PUBLIC KEY");
        customization.setLivenessToken("LIVENESS TOKEN");
        
        BiometridOn.getInstance().startLivenessDetection(String token, LivenessCustomisation customisation, Context context);
    }

     @Override
    public void onLivenessDetectionCallback(boolean status, @Nullable String filePath, @Nullable Errors errors){
        if(status) {
            //filepath is available
        }
    }

...
}
PreviousLiveness DetectionNextLiveness Customisation

Last updated 5 years ago