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
  2. Update Step Management

Update Step

This section contains the necessary method to update step (form types)

For every action in a flow, the corresponding step needs to be updated with the mandatory data specified by the api. Bellow you can find a basic example of an update action form.

 BiometridStandard.getInstance().updateStep(processToken, data, callback);

Parameter

Description

String processToken

Process token

Map<String, Object> data

Form data (key and values)

ProcessCallback callback

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);
        HashMap<String, String> headers = new HashMap<>();
        headers.put("HeaderName", "headerValue");
        
        BiometridStandard.getInstance().init(
                BIOMETRID_API_SERVER_URL ,
                BIOMETRID_APP,
                BIOMETRID_ONBIOMETRID_CREDENTIAL,
                Language.English,    
                this);
    }
    
    @Override
    public void initializationCallback(boolean status, @Nullable Errors errors) {
        if(status) updateStep();
    }

    public void updateStep() {
        BiometridStandard.getInstance().updateStep(processToken, mockUpdateForm(), new ProcessCallback() {
            @Override
            public void updateStepCallback(boolean status, @Nullable String response, @Nullable Errors errors) {
                Log.d(TAG, "updateStepCallback -> status: " + status + " response: " + response);

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

    public static Map<String, Object> mockUpdateForm() {
        Map<String, Object> data= new HashMap<>();
        
        data.put("account_type", "123456");
        data.put("account_holder", "1");
        data.put("client_account_purpose", "P01");
        data.put("funds_origin", foundsList);
  
        return data;
    }
}

Callback params

Parameter

Description

boolean status

Method request status

JsonObject response

All the response from the api

Errors error

Errors associated enum

PreviousUpdate Step ManagementNextLiveness Validation

Was this helpful?