Skip to content

Settings Store

SettingsStoreStep persists/rereads/erases the policy data provided by the SettingsDownloadStep.

This step has to be executed after the successful initialization of the application store. This means that there is no secure store (except the passcodePolicyStore) in the onboarding flow before the execution of the SecureStoreStep.

Input Parameters

Mandatory input parameters:

  • secure store – Properly initialized and opened secure store implementation typically provided by the StoreManagerStep.

  • context – Specifies the android context initiating the flow such as the caller Activity. This setting has to be provided on the initial FlowContext.

Output Parameters

The output of the step is always in the application store.

Using SettingsStoreStep

  1. Set the Secure store in the flowContext.

    1
      flowContext.setSecureStore(secureStore);
    
  2. Initiate the step:

    1
      SettingsStoreStep settingsStoreStep = new SettingsStoreStep();
    
  3. Specify the execute method's FlowActionHandler parameter's "onFailure" and "onSuccess" behaviour:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
        flowManagerService.execute(flow, flowContext, new FlowActionHandler() {
            @Override
            public void onFailure(Throwable t) {
                //set the status, update the caller activity
            }
    
            @Override
            public void onSuccess(FlowContext result) {
                //set the status, update the caller activity
                //read the result
            }
        });
    

Behaviour of SettingsStoreStep

This step writes/reads/deletes the policy data in the application store.