SAP

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Customize the Onboarding Flow

Learn how to customize the UI screens and add your own logic with extension points for the onboarding flow of SAP BTP SDK for Android.

Overview

You will learn

  • ✔How to customize the UI screens for the onboarding flow
  • ✔How to add your own logic by listening to the flow states
  • ✔How to insert your own logic using the action handler
Haoyue Feng H Haoyue Feng August 21, 2026
Created on April 26, 2024
Contributors

More from Haoyue Feng

See all 12 tutorials by Haoyue Feng →

Prerequisites

Steps

Details

You will learn

  • How to customize the UI screens for the onboarding flow
  • How to add your own logic by listening to the flow states
  • How to insert your own logic using the action handler

Step 1 Customize the UI screens for the onboarding flow
—

The onboarding flow is comprised of the following UI components:

  • End user license agreement (EULA) screen
  • Activation screen
  • Authentication screen
  • Set passcode and verify passcode screens
  • Usage consent screen and crash report consent screens.

The visibility and the content of each screen will vary depending on the different application configurations and client code customization.

  1. By default, the first screen of the onboarding flow is the EULA screen. This screen allows users to review and agree to the end user license agreement. To exclude this screen, create a FlowOptions instance that overrides the excludeOnBoardingEulaScreen function to return the value true and set this FlowOptions instance for the FlowContext instance to start the onboarding flow.

    Java
    FlowContext flowContext = new FlowContextBuilder()
                .setApplication(appConfig)
                .setFlowOptions(new FlowOptions(){
                    @Override
                    public boolean excludeOnBoardingEulaScreen() {
                        return true;
                    }
                }).build();
    Flow.start(this, flowContext);

Notice that if the EULA screen is excluded, it will be the responsibility of the client code to handle the end user license agreement.

  1. If the AppConfig instance in FlowContext does not provide the authentication info or host for the mobile application, the activation screen will be displayed to get the complete AppConfig from either the Discovery Service or QR code scanning. By default, the activation screen will be displayed for both activation methods for the user to select. The client code can customize the screen to display only one of these methods.

    Create a FlowOptions instance that overrides the activationOption function to return the ActivationOption, ActivationOption.DS_ONLY value to display the Discovery Service method only, and ActivationOption.QR_ONLY to display the QR code scanning method only. Using the code snippet below, the activation screen will only display the option for scanning a QR code.

    Java
    FlowContext flowContext = new FlowContextBuilder()
                .setApplication(new AppConfig.Builder().applicationId("app_id").build())
                .setFlowOptions(new FlowOptions(){
                    @NotNull
                    @Override
                    public ActivationOption activationOption() {
                        return ActivationOption.QR_ONLY;
                    }
                }).build();
    Flow.start(this, flowContext);

Notice that if the AppConfig instance contains complete information, the onboarding flow will skip the activation screen and go directly to the authentication step.

  1. After getting the complete application configuration, the onboarding flow will display different authentication screens based on the authentication type defined for the application. For example, a screen with user input for User Name and Password properties will be displayed if the authentication type is Basic. If the authentication type is SAML, the screen will redirect to a web page for user login. The logic to decide which authentication screen to display is built into the onboarding flow and client code cannot change it.

  2. The set passcode and verify passcode screen will be skipped if a passcode policy is not enabled on the server side. Notice that in multi-user mode, the passcode step cannot be skipped and a default passcode policy will be created if it’s not enabled on the server.

    Also, the usage consent screen will be skipped if usage reporting is not enabled and the crash report screen will be skipped if crash reporting is not enabled. Otherwise the screens will be displayed in the onboarding flow, the and client code cannot alter this fact. To enable the usage reporting and crash reporting services, the client code needs start them using the SDKInitializer class.

    Java
    List<MobileService> services = new ArrayList<>();
    services.add(new UsageService());
    services.add(new CrashService());
    
    SDKInitializer.INSTANCE.start(this, services.toArray(new MobileService[0]), null);
  3. Besides the options to include or exclude a step, you can set the client code to customize screens using its ScreenSettings, including the title, description and button text for all screens. For some specific screens, such as EULA screen, the client code can specify its own URL for the EULA file. See Onboarding Screens in the help documentation for information on the detailed settings for each screen in the onboarding process.

    To have the customized screen settings take effect in the onboarding flow, set the list of ScreenSettings for the FlowContext instance.

    Java
    List settingsList = new ArrayList<ScreenSettings>();
    EulaScreenSettings eulaScreenSettings = new EulaScreenSettings.Builder().setEulaUrl(
            "file:///android_asset/my_eula.html").build();
    settingsList.add(eulaScreenSettings);
    SetPasscodeScreenSettings setPasscodeScreenSettings =
            new SetPasscodeScreenSettings.Builder().setInstruction("Set my passcode").build();
    settingsList.add(setPasscodeScreenSettings);
    
    FlowContext flowContext = new FlowContextBuilder()
                .setApplication(new AppConfig.Builder().applicationId("app_id").build())
                .setScreenSettings(settingsList)
                .build();
    Flow.start(this, flowContext);
Step 2 Listen to the flow states
+
Step 3 Insert your own logic using action handler
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 3
1. Customize the UI screens for the onboarding flow 2. Listen to the flow states 3. Insert your own logic using action handler
Next