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
Was this helpful?
