Settings Download Step¶
SettingsDownloadStep
gets the policy data required for the initialization of the secure store and logging.
This step executes the same logic for both the onboard and the restore scenarios.
(The iOS equivalent is SAPcpmsSettingsDownloadStep.swift
.)
Input Parameters¶
Mandatory input parameters:
-
onboardingParameters – Provided typically by the
WelcomeScreenStep
. -
okHttpClient – Provided by one of the authentication steps or by the app developer at startup.
-
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¶
- clientPolicy – This step initializes the client policy on the
flowContext
. The client policy encapsulates the UI layer'sPasscodePolicy
object in addition to the logging policy.
Using SettingsDownloadStep
¶
-
Set the Context and the
OkHttpClient
in theflowContext
.flowContext.setContext(callerActivity); flowContext.setOkHttpClient(okHttpClient);
-
Initiate the step:
SettingsDownloadStep settingsDownloadStep = new SettingsDownloadStep();
-
Specify the execute method's
FlowActionHandler
parameter's "onFailure" and "onSuccess" behavior: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 } });
Behavior of SettingsDownloadStep
¶
This step uses the foundation layer's settings object to download the policies. After downloading the policy data, it is written to the flowContext
.
Skipping the Passcode Settings Screen with SettingsDownloadStep
¶
If the Enable Passcode policy is set to false at the actual Mobile Application of the SAP Mobile Services and the passcodePolicy
property of the SettingsDownloadStep
is set to null, the passcode settings screen is not shown during the onboarding and the restore:
SettingsDownloadStep settingsDownloadStep = new SettingsDownloadStep();
settingsDownloadStep.passcodePolicy = null;
If the Enable Passcode policy is set to false at the actual Mobile Application of the SAP Mobile Services and the passcodePolicy
property of the SettingsDownloadStep
is not set, the default passcode policy of the Flows is used.