Flow Configuration¶
The FlowOptions property in FlowContext has the same purpose as that in the view based flows component, but it's simpler.
data class FlowOptions(
val fullScreen: Boolean = false,
val activationOption: ActivationOption = ActivationOption.QR_ONLY,
val useDefaultEulaScreen: Boolean = true,
val oAuthOption: OAuthOption = OAuthOption(),
val screenSettings: CustomScreenSettings = CustomScreenSettings(),
val customStyles: CustomStyles = CustomStyles(),
val resetOption: ResetOption = ResetOption(),
val qrScanOption: QRScanOption = QRScanOption(),
val restoreOption: RestoreOption = RestoreOption()
)
Properties¶
The table below describes the details of each property:
| Property | Description |
|---|---|
fullScreen |
Whether to apply the edge-to-edge mode to the flow steps. |
activationOption |
How to retrieve the application configuration. The default value is using QR code scanning. The other options include 'Discovery Service', 'MDM', etc. |
useDefaultEulaScreen |
Whether to use the EULA screen provided by the SDK or use a customized screen. |
oAuthOption |
Determines which authentication method to use:WebView, CCT, or Browser, and whether to enable PKCE or not. |
screenSettings |
The custom screen settings. |
customStyles |
The customized style artifacts for the Fiori compose theme. |
resetOption |
The options for the reset flow. |
qrScanOption |
The QR scan related options. |
restoreOption |
The options for the restore flow. |
oAuthOption¶
data class OAuthOption(
val webOption: OAuth2WebOption = OAuth2WebOption.WEB_VIEW,
val enablePKCE: Boolean = true,
val browserWhitelist: BrowserWhitelist = BrowserWhitelist.getDefault(),
val preferredBrowser: BrowserDetails? = null,
val browserFallbackPolicy: BrowserFallbackPolicy = BrowserFallbackPolicy.USE_WEB_VIEW,
val showAuthDialog: Boolean = true
)
Here is the explanation of each property of OAuthOption:
| Property | Description |
| webOption | Which method to use for the authentication process, CCT or WebView. |
| enablePKCE | Whether enable PKCE or not for the OAuth authentication process. |
| browserWhitelist | The supported browser allow list. |
| preferredBrowser | The preferred browser to use for the authentication process. If not specified, the default browser will be used. |
| browserFallbackPolicy | If the preferred browser is not installed on the device, how to choose the browser from the device. |
| showAuthDialog | When the authentication fails, SDK will by default show an error dialog before exiting the onboarding flow, this property can decide whether to show the error dialog or not. |
QR Scan Options¶
All QR related options are grouped into a new property qrScanOption, requireQRCodeConfirmScreen and qrCodeSecureOption are moved into it and marked as deprecated in 24.4.0, and a new option, scannerIntentAction, is added to set the laser scanner profile intent input action, please see the document for the details.
data class QRScanOption(
val requireQRCodeConfirmScreen: Boolean = true,
val qrCodeSecureOption: QRCodeSecureOption = QRCodeSecureOption.UNSPECIFIED,
val scannerIntentAction: String = "scan"
)
| Property | Description |
| requireQRCodeConfirmScreen | Whether to show the QR scan result confirmation screen during the onboarding flow. |
| qrCodeSecureOption | Specifies the QR code format, either 'signed', 'unsigned' or 'unspecified' |
| scannerIntentAction | For some laser scanner devices, this is needed so SDK knows where to receive the scan result. It will be ignored if the device does not support laser scan. |
Restore Flow Options¶
data class RestoreOption(
val skipRestoreFlowScreens: Boolean = false,
val handleLockAndWipeInRestoreFlow: Boolean = true,
val executeForgotPasscodeWhenRetryLimitReached: Boolean = true,
val clearPasscodeHistoryWhenForgot: Boolean = false,
val showForgotPasscodeOnSignInScreen: Boolean = true,
val immediatePasscodeChange: Boolean = false,
val skipWipeInformationDialog: Boolean = false,
val enableCrossContextForNonPrimaryUser: Boolean = false,
val showUserListFirst: Boolean = false,
)
| Property | Description |
| skipRestoreFlowScreens | Whether to skip the restore flow screens if passcode policy is not enabled. This is usually used for demo apps with passcode policy disabled at the server side. |
| handleLockAndWipeInRestoreFlow | Whether to let the restore flow handle the lock and wipe status. This is used when the client app enables the feature. By default, the restore flow will handle check the lock and wipe status locally first, then handle the status returned from the server side. At this time, the callbacks in the LockAndWipeService will be ignored. After the restore flow and come into the business screens of the app, the callbacks will be re-enabled. |
| executeForgotPasscodeWhenRetryLimitReached | Whether to start the forgot passcode flow automatically when the passcode retry limit was used up. |
| clearPasscodeHistoryWhenForgot | Whether to clear the user passcode history when starting the forgot passcode flow. |
| showForgotPasscodeOnSignInScreen | Whether to show the forgot passcode button on the sign in screen. |
| immediatePasscodeChange | Whether to start the change passcode flow or not when detecting the current passcode does not comply with the new passcode policy. |
| skipWipeInformationDialog | Whether to skip the information dialog before wiping the user the data. |
| enableCrossContextForNonPrimaryUser | Decide whether to enable QR code scanning for non-primary users during the account creation process. |
| showUserListFirst | This setting determines the initial screen in the restore flow for multiple profile apps. When set to true, the user list screen appears first. If set to false, the sign-in screen is the first screen. |
Reset Options¶
data class ResetOption(
val showOnTimeoutSignInScreen: Boolean = false,
val showOnRestoreSignInScreen: Boolean = true,
)
Whether to show the 'reset' button on the sign in screen of the restore and timeout flows.
EULA Property¶
useDefaultEulaScreen is now the only property related to the EULA screen. If this is set to 'false', then both the onboarding and the account creation flows will not use the internal EULA screen. Instead, the client code needs to provide its own EULA screen with the help of FlowActionHandler, which is described in the 'Extension Points' section.
x
Screen Settings¶
The screenSettings property allows the client code to customize every screen during the onboarding or restore process.
data class CustomScreenSettings(
val logoScreenSettings: ScreenLogoSettings = ScreenLogoSettings(),
val eulaSettings: EulaScreenSettings = EulaScreenSettings(),
val activationDiscoveryScreenSettings: ActivationDiscoveryScreenSettings = ActivationDiscoveryScreenSettings(),
val activationSelectionScreenSettings: ActivationSelectionScreenSettings = ActivationSelectionScreenSettings(
mdmButtonCaption = null
),
val basicAuthenticationScreenSettings: BasicAuthenticationScreenSettings = BasicAuthenticationScreenSettings(),
val biometricScreenSettings: List<BiometricScreenSettings> = listOf(),
val launchScreenSettings: LaunchScreenSettings = LaunchScreenSettings(),
val qrConfirmScreenSettings: QRConfirmScreenSettings = QRConfirmScreenSettings(),
val qrCodeReaderScreenSettings: QRCodeReaderScreenSettings = QRCodeReaderScreenSettings(),
val setPasscodeScreenSettings: SetPasscodeScreenSettings = SetPasscodeScreenSettings(),
val signInScreenSettings: SignInScreenSettings = SignInScreenSettings(),
val verifyPasscodeScreenSettings: VerifyPasscodeScreenSettings = VerifyPasscodeScreenSettings(),
val consentScreenSettings: List<ConsentScreenSettings> = listOf(),
val confirmationSettings: List<ConfirmationDialogSettings> = listOf(),
val permissionRationaleSettings: List<PermissionRationaleSettings> = listOf(),
val laserScanScreenSettings: List<LaserScanScreenSettings> = listOf()
)
The preceding CustomScreenSettings source code contains the settings for every screen used in the onboarding and restore flows. The client code can use them to provide its own labels and button captions for the screens.
There are three settings that are defined as lists: biometricScreenSettings, consentScreenSettings, and confirmationSettings, because there are cases where one screen will be used for different purposes.
For example, there is a screen during onboarding to enable the biometric authentication and there is another screen during the restore flow to unlock the app using biometrics: the screen implementation is the same, but the labels on the two screens should be different.
To allow the flows component to be able to pick the right screen settings, when you provide them, the type property is mandatory.
For example:
data class BiometricScreenSettings(
val biometricScreenType: String,
val iconHeight: Dp = 64.dp,
@StringRes val title: Int = R.string.enable_biometric_title,
@StringRes val description: Int = R.string.enable_biometric_description,
@DrawableRes val icon: Int = R.drawable.biometrics,
@StringRes val iconContentDescription: Int = R.string.sap_enable_biometric_content_desc,
@StringRes val biometricAuthTitle: Int = R.string.enable_biometric_title,
@StringRes val biometricCancelButton: Int = android.R.string.cancel
) : BaseScreenSettings
The biometricScreenType property must be chosen from 'BiometricScreenType.ENABLE.nameorBiometricScreenType.UNLOCK.name`, as shown below:
enum class BiometricScreenType {
ENABLE, UNLOCK
}
Like the biometric screen settings, the consent screens and the confirmation dialog settings need to be chosen from:
//in flows-compose
enum class ConsentType {
USAGE,
CRASH_REPORT
}
//in onboarding-compose
enum class ConfirmationType {
RESET, LOGOUT, DEL_REGISTRATION, FORGOT_PASSCODE
}
Fiori Compose Theme Customization¶
Use customStyles to customize the Fiori compose theme.
data class CustomStyles(
val lightThemeAttributes: BaseAttributes = BaseAttributes(baseColors = BaseColors()),
val darkThemeAttributes: BaseAttributes = BaseAttributes(baseColors = BaseColors()),
val applyStatusBarColor: Boolean = true
)
To customize the Fiori compose theme, the client code needs to provide two sets of BaseAttributes, one for light mode, the other for dark mode. applyStatusBarColor means whether to let FioriHorizenTheme apply the color of BaseAttribute.statusBarColor on the status bar, this is usually used in the case that the client code uses the edge-to-edge full screen mode transparent status bar while BaseAttribute.statusBarColor is not transparent.
For details on how to customize the Fiori compose theme, please refer to the Fiori document.