Identification

Example to Start an Identification

Start the identification process by calling IdentificationActivity.startForResult in your activity.

Please update the below code with your Client ID and Client Secret from your Customer Dashboard. To support multiple documents and other flow settings also use the Customer Dashboard.

Flow ID specify which verification flow to use. Flow IDs are defined in the Customer Dashboard, section Verification Flow.

This method internally prepares Intent for the identification process and starts an activity:

IdentificationParams params = new IdentificationParamsWithClientSecret(
        "< client id >",
        "< client secret >",
        "< flow ID >", // optional
        R.style.AuthenteqThemeBase // optional
);

IdentificationActivity.startForResult(
    activity, 
    MY_REQUEST_CODE,
    params
);

Optionally you can specify a custom style, for more information see the section Customization.

Start an Identification providing authentication Token

Identification can be started by providing the authentication token obtained separately (see section Authentication Token for details).

The optional "Flow ID" can be specified when requesting the authentication token.

To start an identification with a token create an IdentificationParamsWithToken object and use it in the IdentificationActivity.startForResult :

IdentificationParams params = new IdentificationParamsWithToken(
        "< client id >",
        "< token >",
        R.style.AuthenteqThemeBase // optional
);

IdentificationActivity.startForResult(
        fragment,
        REQUEST_CODE_IDENTIFICATION,
        params
);

Authentication token can only be used for a single verification. Always generate a new token before start a new verification.

Identification completion

onActivityResult will be called in your activity after on-boarding is either finished or canceled. Here you can get the on-boarding result and process it:

@Override 
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
    if (requestCode == MY_REQUEST_CODE) {
        if (resultCode == RESULT_OK) {
            final IdentificationResult resul = IdentificationActivity.getResult(data)
            // process onboarding result
        } else {
            // process is canceled by user
            final Throwable error = IdentificationActivity.getError(data);
            if(error != null) {
                // process error
            }               
        }
    } else {
        super.onActivityResult(requestCode, resultCode, data);
    }
}

Last updated