Digipass S3 is now DigipassONE. This section is currently being updated to reflect our new name.

Replacing the Progress Indicator UI

Prev Next

The App SDK provides a default UI class for the Progress Indicator that implements the IProgressObserver interface.

Progress indicator class showing a partial circle and the text "Please wait"

Progress indicator class showing a partial circle and the text "Please wait"

The class that implements your custom UI must also implement the IProgressObserver interface. In addition, an object of Digipass S3's default UI class is created by Digipass S3's ProgressObserverFactory. Therefore, you must define your own factory class to create an object of your custom UI.

The following steps take you through defining your custom UI class and your custom factory class.

  1. Create a custom class that implements your UI.

  2. Declare that your custom class implements the IProgressObserver interface. Define the following methods in your custom UI class: onChanged(), disable(), enable(). These method definitions ensure that your class implements the IProgressObserver interface.

  3. Define a new factory class as a subclass of ProgressObserverFactory. For example, call your new factory SampleProgressObserverFactory.

  4. Override your new factory's createProgressObserver() method. Refer to SampleProgressObserverFactory.kt in the Tutorial App for details on how to write this method.

  5. When you create your factory, set your SampleProgressObserverFactory object to be the ProgressObserverFactory instance.

ProgressObserverFactory.setInstance(SampleProgressObserverFactory())

Refer to the Client API Docs for the ProgressObserver class and the IProgressObserver interface for more details.

Working Example in Tutorial App

  • Refer to file SampleProgressObserverFactory.kt for an example implementation.