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

Replacing the progress indicator UI

Prev Next

The JS App SDK has a default progress indicator that is displayed when the operation is running in the background and there is no UI displayed (e.g. during network requests).

In order to replace the default progress indicator with your own custom UI, you need to implement the IndicatorListener interface.
// IndicatorListener implementation shows or hides
// the custom progress indicator.
function SampleProgressIndicatorListener() {
  // This method is called by the SDK when it needs to show or hide
  // the progress indicator, and the boolean parameter "show" indicates
  // what to do.
  this.changeIndicatorVisibility = function(show) {
    if(show) {
      // Show the custom progress indicator.
    } else {
      // Hide the custom progress indicator.
    }
  }
}
Then in the Controller, you need to register the custom listener.
startcodeProgressIndicator.getInstance().setListener
                                (new SampleProgressIndicatorListener());

Refer to the Client API Docs for details on the IndicatorListener interface and the ProgressIndicator class.

Working examples in Tutorial web app

  • Refer to the SampleProgressIndicatorListener class in the file js/samples.js for implementation of IndicatorListener interface.

  • Refer to js/Controller.js for usage.