Skip to content

Enter Passcode Screen

Introduction

If the user provided a passcode during onboarding, this screen should be shown to allow the user to input a passcode to unlock the application on startup.

Enter Passcode Screen

The passcode input field is capable of displaying errors (if the passcode is not correct, for example). There is also a RESET CLIENT button for cases where the user has forgotten the passcode, or the number of retry attempts has been used up.

Inside the flow component, the number of times a user retries the passcode will be persisted in the application, so that the next time the user tries to input their passcode, the retry limit will be what is left after deducting the previous number of retries. When all the retries are used up, a dialog will be displayed, allowing the user to reset the application.

Examples

val screen = EnterPasscodeScreen(getTargetContext())
    .initialize(
        EnterPasscodeScreenSettings.Builder()
        .setInstruction("Instruction")
        .setTitle("Title")
        .setDoneButtonText("Done")
        .setResetButtonText("Reset")
        .setResetButtonVisible(true)
        .setFooterVisible(true)
        .build()
    )
setContentView(screen)
EnterPasscodeScreen screen = new EnterPasscodeScreen(getTargetContext());
EnterPasscodeScreenSettings ess = new EnterPasscodeScreenSettings.Builder()
        .setInstruction("Instruction")
        .setTitle("Title")
        .setDoneButtonText("Done")
        .setResetButtonText("Reset")
        .setResetButtonVisible(true)
        .setFooterVisible(true)
        .build();
screen.initialize(ess);
setContentView(screen);

Last update: August 12, 2020