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
  • Implementation example
  • Callback params

Was this helpful?

Export as PDF
  1. Standard SDK

Initialization

This section contains the necessary methods to init Biometrid Standard.

In order to use any of the SDK functionalities, the application needs to initialize it first, using the credentials provided during the enrollment on our platform (see prerequisites section above).

BiometridStandard.getInstance().initialize(
                BIOMETRID_API_SERVER_URL,
                BIOMETRID_APP,
                BIOMETRID_CREDENTIAL,
                Language.English,
                customHeaders,
                this);

Parameter

Description

String BIOMETRID_APP

Application key provided

String BIOMETRID_CREDENTIAL

Credential provided

String BIOMETRID_SERVER_URL

URL credential provided

Language language

Language enum

HashMap<String, String> HashMap

Custom Headers

InitializationCallback callback

Result callback

The method above requires the callback to be linked with an activity to obtain the application Context, however this method is not required. When implementing the InitializationCallback outside of an activity, prefer using the following method:

BiometridStandard.getInstance().initialize(
                BIOMETRID_API_SERVER_URL,
                BIOMETRID_APP,
                BIOMETRID_CREDENTIAL,
                Language.English,
                customHeaders,
                this,
                context);

Parameter

Description

String BIOMETRID_APP

Application key provided

String BIOMETRID_CREDENTIAL

Credential provided

String BIOMETRID_SERVER_URL

URL credential provided

Language language

Language enum

HashMap<String, String> HashMap

Custom Headers

InitializationCallback callback

Result callback

Context context

Context of your app

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);
        
        try{
            BiometridStandard.getInstance().initialize(
                BIOMETRID_API_SERVER_URL ,
                BIOMETRID_APP,
                BIOMETRID_ONBIOMETRID_CREDENTIAL,
                Language.English,    
                this);
        } catch (UnableToConnectException e) {
            e.printStackTrace();
        }
    }
    
      @Override
    public void initializationCallback(boolean status, @Nullable Errors error) {
        Log.d(TAG, "initializationCallback-> status: " + status);

        if(error != null)
            Log.e(TAG, "initializationCallback-> error: " + error.name());
    }
}

Callback params

Parameter

Description

Boolean status

Receive status on initialization

Errors error

Errors associated enum

PreviousIntroductionNextRequirements

Was this helpful?