Displaying Accounts Flow for Android

casan142saas
A user can activate CA Strong Authentication for multiple accounts, such as her savings bank account, credit card account, and debit card account. The SDK provides a way for the user to view these accounts.
The Displaying Accounts flow takes place when a user displays the accounts for which she has activated CA Strong Authentication.
This section covers the following topics:
For information about the APIs mentioned in these topics, see API Reference for Android.
Steps in the Displaying Accounts Flow
The following steps take place when the user displays the accounts for which she has activated CA Strong Authentication
:
  1. The user opens the app.
  2. The user taps ACTION ON ACCOUNT.
    Display_Accounts_01_Tap_Display.png
  3. The app displays the accounts.
Displaying Accounts Flow Diagram
The following flow diagram shows the sequence of API calls that take place when the accounts for which CA Strong Authentication has been activated are displayed on the app.
Android - Displaying Accounts
Android - Displaying Accounts
Sample Code for the Displaying Accounts Flow
The following is sample code for displaying the accounts for which CA Strong Authentication has been activated:
//Create an object of the AuthenticationHandler class.
AuthenticationHandler handler = new AuthenticationHandler(<YourActivityName>.this);
//Create an ArrayList object to hold the account details.
ArrayList<AccountDetails> accountList = handler.getAllEnrolledAccounts();
if (accountList.isEmpty()) {
//If there are no accounts for which CA Strong Authentication has been activated, then display a message to the user.
} else {
//If there are accounts for which CA Strong Authentication has been activated, then display the account details to the user.
}