Skip to content

Introduction

The onboarding UI components support the registration process of your app and the initialization and administration of your data vault.

The main entry point of the registration process is the welcome screen/launch screen which navigate to the activation screen. The welcome screen/launch screen is responsible for introducing the application features. The activation screen supports multiple onboarding/registration scenarios including the discovery service based onboarding and QR code based onboarding. If the end user is allowed to select either the discovery service based onboarding and the QR code base onboarding, then the activation screen will be displayed where the user can choose one of these onboarding scenarios. In case of QR code based onboarding the QR code reader screen will display the camera preview.

After the successful registration the create passcode and confirm passcode screens can be used in order to allow the end user to specify a passcode, which can be used for data encryption purposes.

In case of registered apps, the enter passcode screen can be used to ask the user to enter the passcode, which he or she provided at registration time.

In addition to the passcode you can enable the fingerprint authentication as well, which will be supported also by an enter fingerprint screen.

An EULA screen is also provided in order to display the legal disclaimer and ask the end user to accept/reject it.

Prerequisites

Installation

1
2
3
dependencies { 
    compile 'com.sap.cloud.android:onboarding:2.0.0'}
}

Available libraries

The following libraries are available.

Gradle Dependency Line Library
com.sap.cloud.android:onboarding:2.0.0 onboarding
com.sap.cloud.android:google-vision:2.0.0 google-vision

General architecture

The onboarding UI screens are implemented as standard android activities.

The layout and the behavior of these activities can be configured via the standard android intent. In order to facilitate the configuration of these intent based settings, the Settings objects can be used (for example: LaunchScreenSettings, SetPasscodeSettings). The configuration can be set on the Settings objects via standard setter methods and then the saveToIntent method should be called in order to save all these settings into the Intent.

In addition to the Intent based configuration there is also meta-data based callback function mechanism which can be used to determine the implementation of the business logic behind the UI layer, that is the onboarding UI components do not provide any business logic, but they will execute the callback methods provided by the app developer. The app developer should specify the fully qualified class name of the class which implements the callback methods. This should be done via the meta-data tag of the AndroidManifest.xml file. The class implementing the callback methods has to provide a default public constructor as well.

Callback mechanism

The callback methods are executed on a background thread, that is not on the main thread. During the execution of the callback methods the onboarding UI will be disabled (that is all the edit boxes, all the buttons will be disabled) and the progress bar will be displayed. On the other hand, the back button of the android device will not be disabled, the end user can tap on the back button anytime on order to interrupt the long running background processing. If the end user taps on the back button, then the onboarding UI will be enabled again. If the end user taps on the back button,but there is no background processing in progress, then the standard back button function will be executed, that is the activity will be cancelled.

The implementation of the callback methods should return synchronously by default. The only exception is if you start a new activity from your callback method implementation.

If you start new activity from your callback method, then you have to implement the special onActivityResult callback method as well, in order to specify what should happen if the activity you started closed and the caller onboarding activity gets back the result.