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 =newIdentificationParamsWithClientSecret("< client id >","< client secret >","< flow ID >",// optionalR.style.AuthenteqThemeBase// optional);IdentificationActivity.startForResult( activity, MY_REQUEST_CODE, params);
val parameters =IdentificationParamsWithClientSecret("< client id >","< client secret >", R.style.AuthenteqThemeBase // optional)IdentificationActivity.startForResult( activity, REQUEST_CODE_IDENTIFICATION, 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 :
val parameters =IdentificationParamsWithToken("< client id >","< token >", R.style.AuthenteqThemeBase // optional)IdentificationActivity.startForResult( activity, REQUEST_CODE_IDENTIFICATION, parameters)
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:
@OverrideprotectedvoidonActivityResult(int requestCode,int resultCode, @NullableIntent data) {if (requestCode == MY_REQUEST_CODE) {if (resultCode == RESULT_OK) {finalIdentificationResult resul =IdentificationActivity.getResult(data)// process onboarding result } else {// process is canceled by userfinalThrowable error =IdentificationActivity.getError(data);if(error !=null) {// process error } } } else { super.onActivityResult(requestCode, resultCode, data); }}