SAP

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

Handle Passcode with the Flows Component

Learn how to use the Flows component of SAP BTP SDK for Android to handle passcode change, forgetting passcode and passcode verification scenarios.

Overview

You will learn

  • ✔How to change passcode with the Flows component
  • ✔How to handle forgetting passcode scenario with the Flows Component
  • ✔How to verify passcode with the Flows component
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 change passcode with the Flows component
  • How to handle forgetting passcode scenario with the Flows Component
  • How to verify passcode with the Flows component

Step 1 Handle passcode change with the Flows component
—

  1. Open the project you previously created using the SAP BTP SDK Wizard for Android.

  2. In Android Studio, on Windows, press Ctrl+N, or, on a Mac, press command+O, and type SettingsFragment to open SettingsFragment.java.

  3. On Windows, press Ctrl+F12, or, on a Mac, press command+F12, and type onCreatePreferences to move to the onCreatePreferences method. To start the flow to change passcode, the flow type must be FlowType.CHANGEPASSCODE for the FlowContext instance. Upon starting the flow with this FlowContext instance, the entire process to change passcode will be handled automatically.

    !

    Change passcode flow
    Change passcode flow

  4. The “change passcode” flow will firstly display the sign-in screen for user to input current passcode. When sign-in is successful with correct passcode, the flow will open “Create Passcode” and “Verify Passcode” screens for user to input and verify the new passcode. The subsequent step is optional, when biometric authentication is enabled in the passcode policy and is also supported on the device, the “Enable Biometric” screen will be displayed. User can decide whether or not to enable biometric authentication for this app. Then the flow is finished and the new passcode will take effect.

    !

    Change passcode screens
    Change passcode screens

    Notice that in the sign-in screen of a “change passcode” flow, the FORGOT PASSCODE? button is invisible and the SWTICH OR ADD USER button in multi-user mode is also invisible.

Step 2 Handle forgetting passcode with the Flows component
+
Step 3 Handle passcode verification with the Flows component
+

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. Handle passcode change with the Flows component 2. Handle forgetting passcode with the Flows component 3. Handle passcode verification with the Flows component
Next