The Digipass S3 App SDK allows you to customize its built-in UI without programming. By editing a cross-platform JSON UI configuration file, you can:
Replace strings.
Display a friendly name for an authentication method.
Give a title, description and icon to an authenticator.
Explain to the user why an additional authentication method is required.
Modify a style to affect one or many different views.
Use your own images.
Replace the strings in an Android OOB notification.
Handle Dark Mode.
See App UI Customization for instructions to create the JSON UI configuration file.
The App SDK loads your JSON UI configuration file at runtime. You can store your UI Configuration file either locally or on a remote web server. You can even pass your entire UI configuration to the App SDK in a JSON formatted string.
Direct the App SDK to a locally stored UI configuration file
If your JSON UI Configuration File is stored locally, add the following code to your Android app.
UiConfig.addUiConfig(context, "<source of your UI configuration file>", localize: false)Specify the source of your UI configuration file with one of the following:
a filename relative to res/raw
a complete pathname
the entire configuration in a JSON formatted string
To localize your app, pass true into the localize parameter and prepare additional UI configuration files as described in Localize Your App. A localized UI configuration file can be applied only if you pass a filename or a pathname as the source parameter when you call addUiConfig().
Direct the App SDK to a remotely stored UI configuration file
If you store your UI configuration file(s) on a remote server, you must store the files in a specific directory structure under specific filenames. See Using a Remote Server for details. Before you can direct the App SDK to your UI configuration file, you must know the name of your chosen root directory in the remote server.
Your Android app calls the downloadUiConfig() method to download the UI configuration files from your chosen root directory on the remote server. The downloadUiConfig() method also automatically applies the configuration files to your application's user interface.
var ui_config_url: String = "https://www.example.com/uicfg_dir"
UiConfig.downloadUiConfig(app, ui_config_url)
.then{
Log.i(TAG, "The UI configurations are up to date.")
}
.error {result ->
Log.e(TAG, "The download of the UI config failed with an error: $result")
}
The downloadUiConfig() method automatically calls the addUiConfig() method to apply the configuration files to your application's user interface.
If the downloadUiConfig() method finds files in your root configuration directory for a language or an ISO region, it automatically localizes your app using those files.