Biometrid Android SDK
3.0.2
3.0.2
  • Introduction
  • Standard SDK
    • Initialization
    • Requirements
    • Enums
    • Installation
      • Gradle
    • Process Management
      • Create Process
      • Previous Step
      • Get Step State
    • Update Step Management
      • Update Step
    • Liveness Validation
    • Photo Capture
      • Configurations
    • Auto Capture
      • Configurations
    • NFC Passport Reader
      • Scan result
      • Configurations
    • Biometric Authentication
    • Device Location
    • Presence Detection
      • Configurations
  • Full SDK
    • Initialization
    • Requirements
    • Installation
      • Gradle
    • Start
    • Photo Capture
    • Liveness Validation
    • Callbacks
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Standard SDK

Biometric Authentication

Perform biometric authentication using the device preferred authentication methods: FaceID, Fingerprint or PIN code.

 BiometridStandard.getInstance()
         .startAuthentication(activity, processCallback);

AppCompactActivity? activity

Main activity.

ProcessCallback callback

The process result callback.

Implementation example

class ExampleActivity extends AppCompatActivity implements InitializationCallback {
    String TAG = getClass().getSimpleName();
    String BIOMETRID_API_SERVER_URL = "your server URL";
    String BIOMETRID_APP = "your app";
    String BIOMETRID_CREDENTIAL = "your credential";
    
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        BiometridStandard.getInstance().initialize(
                BIOMETRID_API_SERVER_URL ,
                BIOMETRID_APP,
                BIOMETRID_CREDENTIAL,
                Language.English,    
                this);
    }
    
    @Override
    public void initializationCallback(boolean status, @Nullable Errors errors) {
        if(status) startAuthentication();
    }

    public void startAuthentication() {
        BiometridStandard.getInstance().startCamera(this, new ProcessCallback() {
            @Override
            public void authenticationCallback(@Nullable Boolean status, @Nullable Errors errors) {
                if (errors != null) {
                    Log.e(TAG, "authenticationCallback -> error: " + errors.getMessage());
                } else {
                    Log.d(TAG, "authenticationCallback -> status: " + status);
                }
        });
    }
}

authenticationCallback

Description

Boolean? status

The authentication status.

Errors? errors

Detected errors.

PreviousConfigurationsNextDevice Location

Was this helpful?