API Reference for Android
casan142saas
The following topics provide information about the classes, enums, and response beans of the Android SDK:
In the context of this CA solution, the term "accounts" covers both payment card accounts and bank accounts.
Classes
This section describes the classes provided by the SDK.
Class AuthenticationHandler
This AuthenticationHandler class provides methods that can be called by the business app or authenticator app. The app can use these methods to activate CA Strong authentication for a user’s accounts and to authenticate the user.
Java Code Snippet
public class AuthenticationHandler {public static void initSALib(…) public AuthenticationHandler(…) public TransactionDetailsResponse getTransaction() public TransactionDetailsResponse getTransaction(…) public ArrayList<Authentication> getAllAuthenticationModes() public ArrayList<AuthenticationType> getEnabledAuthenticationTypes() public UpdateAuthenticationResponse updateAuthenticationType(…) public AuthenticationResponse authenticateUsingConsent(…) public AuthenticationResponse authenticateUsingUserPin(…) public CancelTransactionResponse cancelTransaction(…) public boolean isPinSetUp() public AccountActivationDetails verifyActivation(…) public AccountActivationDetails verifyActivation(…) public AccountsActivationDetails verifyActivation(…) public AccountsActivationDetails verifyActivation(…) public AccountDeletionResponse deleteAccount(…) public ActivationAcknowledgementResponse setPin(…) public List<ActivationAcknowledgementResponse> setPin(…) public ArrayList<AccountDetails> getAllEnrolledAccounts() public String[] getAllServiceURLs() public boolean setURL(…) public OTPResponse generateOTP(…) public ChangePinResponse changePin(…) public VerifyPinResponse verifyPin(…) public ProfileInfo getProfileInfo() public Boolean isDeviceJailBroken() public SSLPinningConfigResponse configureSSLPinning(SSLPinningConfigs sslPinningConfigs) } |
Constructor
AuthenticationHandler(Context activityContext) | Initializes Activity Context. |
AuthenticationHandler
Constructor of the class. It initializes the Activity context.
Code snippet
public AuthenticationHandler(Context activityContext) throws IllegalArgumentException |
Parameters
Parameter | Mandatory? | Description |
activityContext | Yes | Activity context. |
Return Value
AuthenticationHandler – Instance of the class.
Exceptions
Exception | Descripton |
IllegalArgumentException | This exception is thrown if activityContext is not an instance of android.app.Activity. |
initSALib
Initializes the Activity context, device token (with FCM registration ID), and device nickname.
Code snippet
public static void initSALib(Context activityContext, String fcmRegistrationId, String deviceNickName) |
Parameters
Parameter | Mandatory? | Description |
activityContext | Yes | Activity context. This activity context can be different from the activity context passed to the AuthenticationHandler constructor. |
fcmRegistrationId | Yes | FCM registration ID. |
deviceNickName | Yes | Device nickname. The user can be prompted to specify a device nickname when the SDK is initialized. Alternatively, the existing device nickname can be extracted and shown to the user, along with the option to edit the nickname. Note: The device nickname is used to track the device that has been used to track transactions and authentications conducted. |
Return Value
None.
Exceptions
None.
getTransaction (get latest pending transaction)
Gets the latest pending transaction for the accounts. Call this API when push notification is not used (or is not available) to initiate authentication for a transaction.
Call this API in a background thread.
Code snippet of getTransaction
public TransactionDetailsResponse getTransaction() |
Parameters
None.
Return Value
This method returns a TransactionDetailsResponse object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful. This means one of the accounts has the pending transactions.
- FAILURE:Operation failed.
If the status is FAILURE, then the response object will have one of the following error codes:
- ERROR_SDK_INTERNAL:SDK error scenario.
- ERROR_NO_ACTIVE_ACCOUNTS:No active accounts.
- ERROR_SERVER_UNREACHABLE:Server is not reachable because, for example, the server URL is incorrect or the server is temporarily unavailable.
- ERROR_ACCOUNT_NOT_FOUND:Invalid account. This error is returned if the server returns details of an account that is not available on the SDK.
- ERROR_SERVER_INTERNAL:Server has returned an error.
- ERROR_NO_TRANSACTION_AVAILABLE:There are no pending transactions.
- ERROR_NETWORK_UNAVAILABLE: The device is not connected to the Internet.
- ERROR_PINNING_FAILURE: The SSL pinning has resulted in failure.
Exceptions
None.
getTransaction (get a specified transaction)
Gets the pending transaction corresponding to a particular transaction ID. Call this API to initiate authentication for a transaction after the user taps the push notification received for the transaction.
Call this API in a background thread.
Code snippet
public TransactionDetailsResponse getTransaction(String transactionId, String accountId, String accountType) |
Parameters
Parameter | Mandatory? | Description |
transactionId | Yes | CA Strong Authentication transaction ID. |
accountId | Yes | Account ID. |
accountType | Yes | Account type. |
Return Value
This method returns a TransactionDetailsResponse object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful. This means one of the accounts has the pending transactions.
- FAILURE:Operation failed.
If the status is FAILURE, then the response object will have one of the following error codes:
- ERROR_SDK_INTERNAL:SDK error scenario.
- ERROR_SERVER_UNREACHABLE:Server is not reachable because, for example, the server URL is incorrect or the server is temporarily unavailable.
- ERROR_ACCOUNT_NOT_FOUND:Invalid account. This error is returned if the server returns details of an account that is not available on the SDK.
- ERROR_SERVER_INTERNAL:Server has returned an error.
- ERROR_NO_TRANSACTION_AVAILABLE:There are no pending transactions.
- ERROR_NETWORK_UNAVAILABLE: The device is not connected to the Internet.
- ERROR_INVALID_ARGUMENT: Incorrect details were passed.
- ERROR_PINNING_FAILURE: The SSL pinning has resulted in failure.
Exception
None.
getAllAuthenticationModes
Gets all available (SDK supported) authentication types. Call this API in any scenario in which the app needs to know which authentication types are supported by the SDK on this user's mobile.
Code snippet
public ArrayList<Authentication> getAllAuthenticationModes() |
Parameters
None.
Return Value
ArrayList<Authentication>.
See Authentication for more information.
Exception
None.
getEnabledAuthenticationTypes
Gets all enabled authentication types. Call this API in any scenario in which the app needs to know which authentication types are enabled by the user and are (therefore) available for use during authentication.
Code snippet
public ArrayList<AuthenticationType> getEnabledAuthenticationTypes() |
Parameters
None.
Return Value
ArrayList<AuthenticationType>.
See AuthenticationType for more information.
Exception
None.
updateAuthenticationType
Updates a specific Authentication object in the app database. Call this API to apply (that is, persist) the user's action of enabling or disabling a specific authentication type.
Before calling the updateAuthenticationType API, call the verifyPin API to ensure that the user has submitted the correct PIN.
Call this API in a background thread.
Code snippet
public UpdateAuthenticationResponse updateAuthenticationType(Authentication authentication, String userPin) |
Parameters
Parameter | Mandatory? | Description |
authentication | Yes | An Authentication object. |
userPin | Yes | User PIN. |
Return Value
This method returns an UpdateAuthenticationResponse object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_OPERATION_NOT_ALLOWED:User is trying to disable an authentication type (biometric) that is already disabled.
- ERROR_INCORRECT_PIN_LENGTH:User submitted an invalid PIN.
- ERROR_NO_BIOMETRIC_AVAILABLE:Biometric authentication is not available or configured on this device.
- ERROR_SDK_INTERNAL:SDK error was encountered.
See UpdateAuthenticationResponse for more information.
Exception
None.
authenticateUsingConsent
Applies device authentication.
Use this API when you do not want to apply user authentication (that is, PIN or biometric authentication) for a low-risk transaction. The use of device authentication ensures that the mobile device on which CA Strong Authentication has been activated for the user’s account is used in the authentication process. For more information about device authentication, see CA Strong Authentication SDKs.
Call this API in a background thread.
Code snippet
public AuthenticationResponse authenticateUsingConsent(TransactionDetailsResponse transactionDetailsResponse) |
Parameters
Parameter | Mandatory? | Description |
transactionDetailsResponse | Yes | TransactionDetailsResponse object. |
Return Value
This method returns an AuthenticationResponse object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_SDK_INTERNAL:SDK error was encountered.
- ERROR_NETWORK_UNAVAILABLE:Mobile network is not available because of which the SDK cannot communicate with the server.
- ERROR_INVALID_ARGUMENT:Incorrect details were passed.
- ERROR_SERVER_UNREACHABLE:Server is not reachable because, for example, the server URL is incorrect or the server is temporarily unavailable.
- ERROR_ACCOUNT_NOT_FOUND:Invalid account. This error is returned if the server returns details of an account that is not available on the SDK.
- ERROR_INVALID_AUTHENTICATION_TYPE:Invalid AuthenticationType object present in the request.
- ERROR_INCORRECT_PIN_LENGTH: The PIN length is not valid.
- ERROR_NO_TRANSACTION_AVAILABLE:There are no pending transactions available for the user.
See AuthenticationResponse for more information.
Exception
None.
authenticateUsingUserPin
Applies user authentication by using the user PIN.
This is one of the APIs for applying user authentication. For more information about user authentication, see CA Strong Authentication SDKs.
Call this API in a background thread.
Code snippet
public AuthenticationResponse authenticateUsingUserPin(TransactionDetailsResponse transactionDetailsResponse, String pin) |
Parameters
Parameter | Mandatory? | Description |
transactionDetailsResponse | Yes | TransactionDetailsResponse object. |
Pin | Yes | User PIN. |
Return Value
This method returns an AuthenticationResponse object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_SDK_INTERNAL:SDK error was encountered.
- ERROR_NETWORK_UNAVAILABLE:Mobile network is not available because of which the SDK cannot communicate with the server.
- ERROR_INVALID_ARGUMENT:Incorrect details were passed.
- ERROR_SERVER_UNREACHABLE:Server is not reachable because, for example, the server URL is incorrect or the server is temporarily unavailable.
- ERROR_ACCOUNT_NOT_FOUND:Invalid account. This error is returned if the server returns details of an account that is not available on the SDK.
- ERROR_SERVER_INTERNAL:Server has returned an error.
- ERROR_INVALID_AUTHENTICATION_TYPE:Invalid AuthenticationType object present in the request.
- ERROR_NO_TRANSACTION_AVAILABLE: There are no pending transactions available for the user.
- ERROR_PINNING_FAILURE: The SSL pinning has resulted in failure.
See AuthenticationResponse for more information.
Exception
None.
autoEnrollAccount
Auto-enrolls a replacement card account.
Code Snippet
public AutoEnrollmentResponse autoEnrollAccount(String displayName)
Parameters
Parameter | Mandatory? | Description |
displayName | Yes | Display name for the auto-enrolled account. This name can be derived from, for example, the card number. |
Return Value
This method returns an AutoEnrollmentResponse object, which contains the auto-enrollment details for the replacement card account.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following errorCode values is returned:
- ERROR_SERVER_UNREACHABLE:Server is not reachable because, for example, the server URL is incorrect or the server is temporarily unavailable.
- ERROR_DISPLAY_NAME_ALREADY_EXISTS:Display name already exists in the database.
- ERROR_INVALID_DISPLAY_NAME:Display name is not valid because, for example, it is NULL or an empty string.
- ERROR_AUTO_ENROLLMENT_FAILURE:Auto-enrollment operation failed on the server. Display a Transaction Rejected message.
- ERROR_AUTHENTICATION_FAILURE:Authentication of the new account failed after successful auto-enrollment. Display a Transaction Rejected message.
- ERROR_SDK_LIB_NOT_INITIALIZED:Device parameter not initialized.
- ERROR_NETWORK_UNAVAILABLE:The device is not connected to the Internet.
- ERROR_PIN_SETUP_PENDING:The user PIN is not set.
- ERROR_PINNING_FAILURE:The SSL pinning has resulted in failure.
- ERROR_NO_TRANSACTION_AVAILABLE: There are no pending transactions available for the user.
Exception
None.
cancelTransaction
Cancels the transaction specified by a TransactionDetailsResponse object. Call this API when, for example, the user declines a transaction. You can decide on the other scenarios for which this API must be called.
Call this API in a background thread.
Code snippet
public CancelTransactionResponse cancelTransaction(TransactionDetailsResponse transactionDetailsResponse) |
Parameters
Parameter | Mandatory? | Description |
transactionDetailsResponse | Yes | TransactionDetailsResponse object. |
Return Value
This method returns a CancelTransactionResponse object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_SDK_INTERNAL:SDK error was encountered.
- ERROR_NETWORK_UNAVAILABLE:Mobile network is not available because of which the SDK cannot communicate with the server.
- ERROR_INVALID_ARGUMENT:Incorrect details were passed.
- ERROR_SERVER_UNREACHABLE:Server is not reachable because, for example, the server URL is incorrect or the server is temporarily unavailable.
- ERROR_NO_TRANSACTION_AVAILABLE: There are no pending transactions available for the user.
- ERROR_PINNING_FAILURE:The SSL pinning has resulted in failure.
See CancelTransactionResponse for more information.
Exception
None.
isPinSetUp
Returns true if the user has set up a PIN. Most of the SDK flows, including the Authentication flows, begin with a call to this API. These flows can proceed only if the user has a PIN.
Code snippet
public boolean isPinSetUp() |
Parameters
None.
Return Value
boolean
Exception
None.
verifyActivation (for the first account before the PIN is set up)
Activates CA Strong Authentication for the first account.
The user sets up the PIN while activating CA Strong Authentication for the first account. The PIN setup page is displayed to the user as part of this API call.
Call this API in a background thread.
This API is deprecated, and it will be removed in a future release. To activate CA Strong Authentication for a single account, you can call the 'verifyActivation (for multiple accounts before the PIN is set up)' API, which is covered later in this table.
Code snippet
public AccountActivationDetails verifyActivation(String activationRefId, String activationCode, String serverURL, String displayName) |
Parameters
Parameter | Mandatory? | Description |
activationRefId | Yes | Reference ID. |
activationCode | Yes | Activation code. |
serverURL | Yes | CA Strong Authentication server URL. |
displayName | Yes | Display name of the account. |
Return Value
Returns an AccountActivationDetails object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_SDK_INTERNAL:SDK error was encountered.
- ERROR_NETWORK_UNAVAILABLE:Mobile network is not available because of which the SDK cannot communicate with the server.
- ERROR_INVALID_ARGUMENT:Incorrect details were passed.
- ERROR_SERVER_UNREACHABLE:Server is not reachable because, for example, the server URL is incorrect or the server is temporarily unavailable.
- ERROR_SDK_LIB_NOT_INITIALIZED:SDK is not initialized.
- ERROR_DISPLAY_NAME_ALREADY_EXISTS:Display name already exists in the database.
- invalid_activation_code:User submitted an invalid activation code.
- invalid_activation_ref_id:User submitted an invalid reference ID.
- ERROR_SERVER_INTERNAL:Internal server error occurred.
- ERROR_INCORRECT_PIN_LENGTH: The PIN length is not valid.
- ERROR_PINNING_FAILURE:The SSL pinning has resulted in failure.
See AccountActivationDetails for more information.
Exception
None.
verifyActivation (for a single account after the PIN is set up)
Activates CA Strong Authentication for the second or subsequent account.
The PIN must be set up before calling this API.
Call this API in a background thread.
This API is deprecated, and it will be removed in a future release. To activate CA Strong Authentication for a single account, you can call the 'verifyActivation (for multiple accounts before the PIN is set up)' API, which is covered later in this table.
Code snippet
public AccountActivationDetails verifyActivation(String activationRefId, String activationCode, String serverURL, String displayName, String userPin) |
Parameters
Parameter | Mandatory? | Description |
activationRefId | Yes | Reference ID. |
activationCode | Yes | Activation code. |
serverURL | Yes | CA Strong Authentication server URL. |
displayName | Yes | Display name of the account. |
userPin | Yes | User PIN. |
Return Value
Returns an AccountActivationDetails object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_SDK_INTERNAL:SDK error was encountered.
- ERROR_NETWORK_UNAVAILABLE:Mobile network is not available because of which the SDK cannot communicate with the server.
- ERROR_INVALID_ARGUMENT:Incorrect details were passed.
- ERROR_SERVER_UNREACHABLE:Server is not reachable because, for example, the server URL is incorrect or the server is temporarily unavailable.
- ERROR_SDK_LIB_NOT_INITIALIZED:SDK is not initialized.
- ERROR_DISPLAY_NAME_ALREADY_EXISTS:Display name already exists in the database.
- invalid_activation_code:User submitted an invalid activation code.
- invalid_activation_ref_id:User submitted an invalid reference ID.
- ERROR_SERVER_INTERNAL:Internal server error was encountered.
- ERROR_INVALID_ACTIVATION_PARAMS: The request parameter is empty.
- ERROR_INVALID_SERVER_URL: Server URL is empty.
See AccountActivationDetails for more information.
Exception
None.
verifyActivation (for multiple accounts before the PIN is set up)
Activates CA Strong Authentication for multiple accounts.
The user sets up the PIN as part of this process. The PIN setup page is displayed to the user as part of this API call.
Call this API in a background thread.
Code snippet
public AccountsActivationDetails verifyActivation(AccountActivationRequest[] requests, String serverUrl) |
Parameters
Parameter | Mandatory? | Description | ||||||||
AccountActivationRequest[] | Yes | Array of AccountActivationRequest objects. Each object contains the following attributes:
| ||||||||
serverURL | Yes | CA Strong Authentication server URL. |
Return Value
Returns an AccountsActivationDetails object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_SDK_INTERNAL:SDK error was encountered.
- ERROR_NETWORK_UNAVAILABLE:Mobile network is not available because of which the SDK cannot communicate with the server.
- ERROR_INVALID_ARGUMENT:Incorrect details were passed.
- ERROR_SERVER_UNREACHABLE:Server is not reachable because, for example, the server URL is incorrect or the server is temporarily unavailable.
- ERROR_SDK_LIB_NOT_INITIALIZED:SDK is not initialized.
- ERROR_DISPLAY_NAME_ALREADY_EXISTS:Display name already exists in the database.
- invalid_activation_code:User submitted an invalid activation code.
- invalid_activation_ref_id:User submitted an invalid reference ID.
- ERROR_INCORRECT_PIN_LENGTH:User submitted an invalid PIN.
- ERROR_SERVER_INTERNAL:Internal server error occurred.
- ERROR_PINNING_FAILURE:The SSL pinning has resulted in failure.
See AccountsActivationDetails for more information.
Exception
None.
verifyActivation (for multiple accounts after the PIN is set up)
Activates CA Strong Authentication for multiple accounts.
This API must be called if the user has already set up the PIN.
Call this API in a background thread.
Code snippet
public |
Parameters
Parameter | Mandatory? | Description | ||||||||
AccountActivationRequest[] | Yes | Array of AccountActivationRequest objects. Each object contains the following attributes:
| ||||||||
serverURL | Yes | CA Strong Authentication server URL. | ||||||||
userPin | Yes | User PIN. |
Return Value
Returns an AccountsActivationDetails object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_SDK_INTERNAL:SDK error was encountered.
- ERROR_NETWORK_UNAVAILABLE:Mobile network is not available because of which the SDK cannot communicate with the server.
- ERROR_INVALID_ARGUMENT:Incorrect details were passed.
- ERROR_SERVER_UNREACHABLE:Server is not reachable because, for example, the server URL is incorrect or the server is temporarily unavailable.
- ERROR_SDK_LIB_NOT_INITIALIZED:SDK is not initialized.
- ERROR_DISPLAY_NAME_ALREADY_EXISTS:Display name already exists in the database.
- invalid_activation_code:User submitted an invalid activation code.
- invalid_activation_ref_id:User submitted an invalid reference ID.
- ERROR_INCORRECT_PIN_LENGTH:User submitted an invalid PIN.
- ERROR_SERVER_INTERNAL:Internal server error occurred.
See AccountsActivationDetails for more information.
Exception
None.
deleteAccount
Deletes the account specified by an AccountDetails object.
This method will be deprecated in a future release. The unenrollAccounts API can be used to delete a single or multiple accounts. This overloaded API is described later in this table.
Call this API in a background thread.
Code snippet
public AccountDeletionResponse deleteAccount(AccountDetails account) |
Parameters
Parameter | Mandatory? | Description |
account | Yes | AccountDetails object |
Return Value
Returns an AccountDeletionResponse object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then the one of the following error codes is returned:
- ERROR_SDK_INTERNAL:SDK error was encountered.
- ERROR_NETWORK_UNAVAILABLE:Mobile network is not available because of which the SDK cannot communicate with the server.
- ERROR_INVALID_ARGUMENT:Incorrect details were passed.
- ERROR_ACCOUNT_NOT_FOUND:Invalid account. This error is returned if the server returns details of an account that is not available on the SDK.
- ERROR_INTERNAL_READWRITE:The query execution failed due to insufficient permissions.
- ERROR_SERVER_UNREACHABLE:Server is not reachable. Returns nill or empty value in the response.
- ERROR_PINNING_FAILURE: The SSL pinning has resulted in failure.
See AccountDeletionResponse for more information.
Exception
None.
setPin (for a single account)
Sets the user PIN when the verifyActivation method (for a single account) is called in a scenario when the user has not set a PIN..
Call this API in a background thread.
Code snippet
public ActivationAcknowledgementResponse setPin(String accountId, String userPin) |
Parameters
Parameter | Mandatory? | Description |
accountId | Yes | Account ID. |
userPin | Yes | User PIN. |
Return Value
Return an ActivationAcknowledgementResponse object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, the one of the following error codes value is returned:
- ERROR_SDK_INTERNAL:SDK error was encountered.
- ERROR_ACCOUNT_NOT_FOUND:Invalid account. This error is returned if the server returns details of an account that is not available on the SDK.
- ERROR_NETWORK_UNAVAILABLE:Mobile network is not available because of which the SDK cannot communicate with the server.
- ERROR_INVALID_ARGUMENT:Incorrect details were passed.
- ERROR_INTERNAL_READWRITE:Error encountered while saving the user PIN.
- ERROR_INCORRECT_PIN_LENGTH:The PIN length is not correct.
- ERROR_PINNING_FAILURE: The SSL pinning has resulted in failure.
See ActivationAcknowledgementResponse for more information.
Exception
None.
setPin (for multiple accounts)
Sets the user PIN when the verifyActivation method (for multiple accounts) is called in a scenario when the user has not set a PIN.
Call this API in a background thread.
Code snippet
List<ActivationAcknowledgementResponse> setPin(String userPin) |
Parameters
Parameter | Mandatory? | Description |
userPin | Yes | User PIN. |
Return Value
Return a List of ActivationAcknowledgementResponse objects. Each object contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, the one of the following error codes value is returned:
- ERROR_SDK_INTERNAL:SDK error was encountered.
- ERROR_NETWORK_UNAVAILABLE:Mobile network is not available because of which the SDK cannot communicate with the server.
- ERROR_INVALID_ARGUMENT:Incorrect details were passed.
- ERROR_INTERNAL_READWRITE:Error encountered while saving the user PIN.
- ERROR_INVALID_PIN:Invalid PIN submitted by the user.
- ERROR_INVALID_REQUEST:setPin is called when it is not required by the SDK.
- ERROR_PINNING_FAILURE:The SSL pinning has resulted in failure.
See ActivationAcknowledgementResponse for more information.
Exception
None.
getAllEnrolledAccounts
Gets all accounts for which CA Strong Authentication has been activated.
Code snippet
public ArrayList<AccountDetails> getAllEnrolledAccounts() |
Parameters
None.
Return Value
ArrayList of AccountDetails objects.
See AccountDetails for more information.
Exception
None.
getAllServiceURLs
Gets the service URLs for activating CA Strong Authentication for the user’s accounts. These URLs may be direct URLs of the CA Strong Authentication server. Alternatively, they can be URLs of the enterprise back-end server that, in turn, calls the CA Strong Authentication server.
Code snippet
public String[] getAllServiceURLs() |
Parameters
None.
Return Value
String array.
Exception
None.
setURL
Updates the Service URL for the specified organization, in the SDK database. Returns true if the update operation is successful.
Code snippet
public boolean setURL(String orgName, String newURL) |
Parameters
Parameter | Mandatory? | Description |
orgName | Yes | Organization name in CA Strong Authentication. |
newURL | Yes | Service URL. |
Return Value
boolean
Exception
None.
generateOTP (generates OTP without using transaction data)
Generates an OTP in the Offline mode for the specified account, without using transaction data.
If you are implementing the Dynamic Linking article of PSD2, then see generateOTP (generates OTP using transaction data).
Code snippet
public OTPResponse generateOTP(AccountDetails account, String userPin) |
Parameters
Parameter | Mandatory? | Description |
account | Yes | AccountDetails object. |
userPin | Yes | User PIN. |
Return Value
Returns an OTPResponse object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_SDK_INTERNAL:SDK error scenario.
- ERROR_INVALID_ARGUMENT:Incorrect details were passed.
- ERROR_INCORRECT_PIN_LENGTH:The PIN length is not valid.
See OTPResponse for more information.
Exception
None.
generateOTP (generates OTP using transaction data)
Generates an OTP in the Offline mode for the specified account by using transaction data. Use this API if you are implementing the Dynamic Linking article of PSD2.
Code snippet
public OTPResponse generateOTP(AccountDetails account, String userPin, HashMap additionalInputs) |
Parameters
Parameter | Mandatory? | Description |
account | Yes | AccountDetails object. |
userPin | Yes | User PIN. |
additionalInputs | Yes | HashMap that holds the SIGNING_DATA key. The value of this key must be the transaction data. The SIGNING_DATA is defined in the M3DSConstants file. It can be referred to as follows: additionalInput.put(M3DSConstants.SIGNING_DATA,transactionSignData) |
Return Value
Returns an OTPResponse object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_SDK_INTERNAL:SDK error scenario.
- ERROR_INVALID_ARGUMENT:Incorrect details were passed.
- ERROR_INCORRECT_PIN_LENGTH:The PIN length is not valid.
See OTPResponse for more information.
Exception
None.
changePin
Changes the user PIN.
Call this API in a background thread.
Code snippet
public ChangePinResponse changePin(String oldPin, String newPin) |
Parameters
Parameter | Mandatory? | Description |
oldPin | Yes | Old user PIN. |
newPin | Yes | New user PIN. |
Return Value
Returns a ChangePinResponse object, which contains the status and error code.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_SDK_INTERNAL:SDK error scenario.
- ERROR_INCORRECT_PIN_LENGTH:The PIN length is not valid.
See ChangePinResponse for more information.
Exception
None.
verifyPin (verifies PIN without using transaction data)
Verifies the user PIN, without using transaction data.
Use this API for operations such as activating new accounts on the device, changing the PIN, disabling or enabling the authentication types, or deleting an account.
If you are implementing the Dynamic Linking article of PSD2, then see verifyPin (verifies PIN using transaction data).
Call this API in a background thread.
Code snippet
public VerifyPinResponse verifyPin(String pin) |
Parameters
Parameter | Mandatory? | Description |
Pin | Yes | User PIN. |
Return Value
Returns a VerifyPinResponse object, which contains the status and error message.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_INCORRECT_PIN_LENGTH:Invalid user PIN.
- ERROR_SDK_INTERNAL:SDK error was encountered.
- ERROR_NO_ACTIVE_ACCOUNTS:No active accounts are present.
- ERROR_SERVER_INTERNAL:Server has returned an error.
- ERROR_PINNING_FAILURE:The SSL pinning has resulted in failure.
Exception
None.
verifyPin (verifies PIN without using transaction data)
Verifies the user PIN, without using transaction data.
Use this API for operations such as activating new accounts on the device, changing the PIN, disabling or enabling the authentication types, or deleting an account.
If you are implementing the Dynamic Linking article of PSD2, then see verifyPin (verifies PIN using transaction data).
Call this API in a background thread.
Code snippet
public VerifyPinResponse verifyPin(String pin, TransactionDetailsResponse transactionDetailsResponse, String autoEnrollId) |
Parameters
Parameter | Mandatory? | Description |
Pin | Yes | User PIN. |
AutoEnrollId | Yes | The auto enroll identifier. |
Return Value
Returns a VerifyPinResponse object, which contains the status and error message.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_SDK_LIB_NOT_INITIALIZED: Device parameter not initialized.
- ERROR_SDK_INTERNAL: SDK has returned an error.
- ERROR_NETWORK_UNAVAILABLE: The device is not connected to the Internet.
- ERROR_PIN_SETUP_PENDING: The user PIN is not set.
- ERROR_INVALID_ARGUMENT: Incorrect details were passed.
- ERROR_INCORECT_PIN_LENGTH: The user PIN length is incorrect.
Exception
None.
verifyPin (verifies PIN using transaction data)
Verifies the user PIN by using transaction data.
Use this API if you are implementing the Dynamic Linking article of PSD2.
Use this API for operations such as activating new accounts on the device, changing the PIN, disabling or enabling the authentication types, or deleting an account.
Call this API in a background thread.
Code snippet
public VerifyPinResponse verifyPin(String pin, String transactionSignData) |
Parameters
Parameter | Mandatory? | Description |
pin | Yes | User PIN. |
transactionSignData | Yes | Transaction data for signing |
Return Value
Returns a VerifyPinResponse object, which contains the status and error message.
The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
If the status is FAILURE, then one of the following error codes is returned:
- ERROR_INCORRECT_PIN_LENGTH:Invalid user PIN.
- ERROR_SDK_INTERNAL:SDK error was encountered.
- ERROR_NO_ACTIVE_ACCOUNTS:No active accounts are present.
- ERROR_SERVER_INTERNAL:Server has returned an error.
- ERROR_INVALID_ARGUMENT:Transaction data is null or empty.
- ERROR_PINNING_FAILURE:The SSL pinning has resulted in failure.
Exception
None.
getProfileInfo
Returns the device information.
Code snippet
public ProfileInfo getProfileInfo()
Parameters
None.
Return Value
Return a ProfileInfo object, which contains the status and error code values.
The status can be one of the following values:
- SUCCESS: Operation was successful.
- FAILURE: Operation failed.
If status is FAILURE, then one of the below error codes will be returned in the response object.
- PROFILE_INFO_NOT_AVAILABLE: No profile available in the device.
Exception
None.
isDeviceJailBroken
Code snippet
public Boolean isDeviceJailBroken()
Parameters
None.
Return Value
Return a boolean object.The status can be one of the following values:
- TRUE: Indicates device is jail-broken.
- FALSE: Indicates that the device is not jail-broken.
Exception
None.
unenrollAccounts (for a single or multiple accounts)
Deletes a single or multiple accounts selected by the user.
Call this API in a background thread.
Code snippet
public boolean unenrollAccounts(List<AccountDetails> accountDetails, boolean removeFromServer)
Parameters
Parameter | Mandatory? | Description |
accountDetails | Yes | Array of AccountDetails objects. |
removeFromServer | Yes | Boolean flag that specifies whether the accounts must also be deleted from the CA Strong Authentication server. When this flag is set to true, accounts are removed from the device and server. However, the PIN is not removed, so new accounts can continue to be provisioned on this device. |
Return Value
Return a boolean value, which specifies whether the accounts have been deleted.
Exception
None.
unenrollAccounts (for all accounts)
Deletes all accounts and can also delete the PIN setup.
Call this API in a background thread.
Code snippet
public boolean unenrollAccounts(boolean removePinSetup, boolean removeFromServer)
Parameters
Parameter | Mandatory? | Description |
removePinSetup | Yes | Boolean flag that specifies whether the user's current PIN must be retained or removed. In addition, the PIN is removed. To activate new accounts on this device or a different device, the user will be prompted to set up a PIN. |
removeFromServer | Yes | Boolean flag that specifies whether the accounts must also be deleted from the CA Strong Authentication server. When this flag is set to true, accounts are removed from the device and server. However, the PIN is not removed, so new accounts can continue to be provisioned on this device. |
Return Value
Return a Boolean value, which specifies whether the accounts have been deleted.
Exception
None.
configureSSLPinning (SSLPinningConfigs sslPinningConfigs)
This method checks if the SSL pinning configurtion is successful.
Code snippet
public SSLPinningConfigResponse configureSSLPinning(SSLPinningConfigs sslPinningConfigs)
Parameters
Parameter | Mandatory? | Description |
sslPinningConfigs | Yes | Contains the pinning configuration details, such as certificates, type of pinning (public key or certiticate), indication if the pinning is required or not. |
Return Value
Returns a SSLPinningResponse object, which contains status, error code, and error message. The status can be one of the following values:
- SUCCESS:Operation was successful.
- FAILURE:Operation failed.
- ERROR_PINNING_CONFIGThe SSL pinning configuration has resulted in failure. This error can be returned in case of following scenario. Based on the error description, provide the correct input to the SDK.
- SSL configuration (sslPinningConfigs) is null
- Certificate is null
- Certificate size is zero
Exception
None.
Class Authentication
This Authentication class contains the AuthenticationType and AuthenticationTypeStatus enums. This class manages the various authentications types, such as USER_PIN and BIOMETRIC.
Java Code Snippet
public class Authentication {public Authentication(AuthenticationType authType, AuthenticationTypeStatus authTypeStatus) public AuthenticationType getAuthType () public void setAuthType(AuthenticationType authType) public AuthenticationTypeStatus getAuthTypeStatus() public void setAuthTypeStatus(AuthenticationTypeStatus authTypeStatus) } |
Constructor
Authentication(AuthenticationType authType, AuthenticationTypeStatus authTypeStatus) | Initializes the Authentication object. |
Methods
getAuthType | Gets the AuthenticationType instance. See AuthenticationType. |
setAuthType | Sets the AuthenticationType instance value |
getAuthTypeStatus | Gets the AuthenticationTypeStatus instance. |
setAuthTypeStatus | Sets the AuthenticationTypeStatus instance value. |
Class FingerPrintAuthenticator
This FingerPrintAuthenticator class contains methods to authenticate using biometrics (fingerprtints).
Java Code Snippet
public class FingerPrintAuthenticator {public FingerPrintAuthenticator(AuthenticateTransactionCallback authenticateTransactionCallback, Context activityContext, TransactionDetailsResponse transactionDetailsResponse) public FingerPrintAuthenticator(GenerateOTPCallback generateOTPCallback, Context activityContext, AccountDetails accountDetails) public void setTransactionSignData(String transactionSignData) public void setFingerPrintDialogueTitle(String title) public void setFingerPrintDialogueMessage(String message) public void setFingerPrintTouchSensorText(String sensorText) public void setFingerPrintCancelButtonText(String cancelButtonText) public void setFingerPrintAuthenticationFailureText(String authFailureText) public void setFingerPrintAuthenticationSuccessText(String authSuccessText) public void setPinAuthenticationText(String pinToAuthenticateText) public void authenticate() } |
Constructor
FingerPrintAuthenticator(AuthenticateTransactionCallback authenticateTransactionCallback, Context activityContext, TransactionDetailsResponse transactionDetailsResponse) | Initializes the FingerPrintAuthenticator object for fingerprint authentication of a transaction. |
FingerPrintAuthenticator(GenerateOTPCallback generateOTPCallback, Context activityContext, AccountDetails accountDetails) | Initializes the FingerPrintAuthenticator object for generating an OTP using fingerprint authentication. |
Methods
setTransactionSignData | Sets the transaction data (if available) for signing the transaction. |
setFingerPrintDialogueTitle | Sets the title of the fingerprint dialog that prompts the user for fingerprint authentication. |
setFingerPrintDialogueMessage | Sets the message of the fingerprint dialog that prompts the user for fingerprint authentication. |
setFingerPrintTouchSensorText | Sets the message of the fingerprint dialog touch sensor text. |
setFingerPrintCancelButtonText | Sets the message of the fingerprint dialog cancel button text. |
setFingerPrintAuthenticationFailureText | Sets the message of the fingerprint dialog in case of authentication failure. |
setFingerPrintAuthenticationSuccessText | Sets the message of the fingerprint dialog authentication success message. |
setPinAuthenticationText | Sets the message of the fingerprint dialog for the PIN authentication text. This will shown after the user fails to authenticate using fingerprint. The PIN authentication is a fallback means of verifying the user. |
authenticate | Authenticates the user by using fingerprint authentication. |
authenticate
Authenticates the user by using fingerprint authentication.
This is one of the APIs for applying user authentication. For more information about user authentication, see CA Strong Authentication SDKs.
Code snippet
public void authenticate()
Parameters
None.
Return Value
None. The outcome of authentication is returned in the specified callback methods.
Exception
None.
Interfaces
This section describes the interfaces provided by the SDK.
Interface FingerPrintAuthenticationCallback
The FingerPrintAuthenticationCallback interface defines callback methods that perform actions corresponding to the outcome of biometric authentication.
Java Code Snippet
package com.ca.mpn_android_lib.fingerprint; public interface FingerPrintAuthenticationCallback { void onAuthenticationFailure(String errorCode); void onAuthenticationCancelled(); void onAuthenticationFallback(); } |
Methods
onAuthenticationFailure | Method is retuning the error code. |
onAuthenticationCancelled | Method to handle the scenario in which the user selects the PIN option. In other words, the user opts to use PIN authentication instead of continuing with biometric authentication. |
onAuthenticationFallback | Method to handle the scenario in which the user cancels or closes the biometric authentication dialog. |
Returns the
ERROR_NO_TRANSACTION_AVAILABLE
error code.Interface AuthenticateTransactionCallback
The AuthenticateTransactionCallback interface defines callback methods that perform actions corresponding to the outcome of biometric authentication during a transaction. This interface extends the FingerPrintAuthenticationCallback interface.
Java Code Snippet
package com.ca.mpn_android_lib.fingerprint; import com.ca.mobile3ds.beans.AuthenticationResponse; public interface AuthenticateTransactionCallback extends FingerPrintAuthenticationCallback { void onAuthenticationSuccess(AuthenticationResponse authenticationResponse); } |
Methods
onAuthenticationSuccess | Method to handle the Success response from transaction authentication. |
Interface GenerateOTPCallback
The GenerateOTPCallback interface defines callback methods that perform actions corresponding to the outcome of biometric authentication during the Generate OTP (Offline Mode) flow. This interface extends the FingerPrintAuthenticationCallback interface.
Java Code Snippet
package com.ca.mpn_android_lib.fingerprint; import com.ca.mobile3ds.beans.OTPResponse; public interface GenerateOTPCallback extends FingerPrintAuthenticationCallback { void onAuthenticationSuccess(OTPResponse otpResponse); } |
Methods
onAuthenticationSuccess | Method to handle the Success response from authentication conducted during the Generate OTP (Offline Mode) flow. |
Enums
This section describes the enums provided by the SDK.
Enum AuthenticationType
The AuthenticationType enum defines the various authentication types.
Java Code Snippet
public enum AuthenticationType {DEVICE_PIN_AUTH(0), USER_PIN_AUTH(1), BIOMETRIC_AUTH(2); public int getIntValue() public static AuthenticationType getAuthTypeFromIntValue(int intValue) } |
The value DEVICE_PIN_AUTH(0) indicates device authentication.
Enum AuthenticationTypeStatus
The AuthenticationTypeStatus enum defines the statuses of an authentication type.
Java code snippet
public enum AuthenticationTypeStatus { ENABLED(0), DISABLED(1), NA(2); public int getIntValue() public static AuthenticationTypeStatus getAuthTypeFromIntValue(int intValue) } |
The value NA(2) indicates that biometric authentication is not supported on the device.
Response Beans
This section describes the classes whose objects are returned by the responses of the SDK operations.
Class TransactionDetailsResponse
The TransactionDetailsResponse class contains information about pending transactions. An object of this class is sent in the response of the getTransaction method.
See getTransaction for more information.
Java Code Snippet
public class TransactionDetailsResponse {public String getStatus() public String getTransactionId() public String getTransactionMessage() public String getDisplayName() public ArrayList<AuthenticationType> getAuthenticationTypes() public String getErrorCode() public String getAutoEnrollId() public String getRequestorAppURL() } |
Methods
getStatus | Gets the status of pending transactions. See the getTransaction method for more information. |
getTransactionId | Gets the transaction ID. |
getTransactionMessage | Gets the transaction message that has the details of the transaction conducted by the user. These details are displayed by the app to the user. For a push-notification-based transaction, the transaction message contains the HTML snippets that were specified as the value of the Push Body Heading Message and Push Body Passage Message elements in the Push Notification message template. |
getDisplayName | Gets the user account display name for the pending transactions. |
getAuthenticationTypes | Gets an ArrayList of AuthenticationTypes. See the AuthenticationType enum for more information. |
getErrorCode | Gets the error code value. |
getAutoEnrollId | Gets the Auto Enrollment ID that is used to auto-enroll a replacement card. |
getRequestorAppURL | Gets the Mobile App Link to the merchant app used for transaction. This URL is used to switch to the Merchant app from the Issuer App. |
Class AuthenticationResponse
The AuthenticationResponse class contains information about user authentication results. An object of this class is sent in the response of the authenticateUsingConsent and authenticateUsingUserPin methods.
See the authenticateUsingConsent and authenticateUsingUserPin methods for more information.
Java Code Snippet
public class AuthenticationResponse {public String getTransactionId() public String getStatus() public boolean getAttemptAgain() public String getErrorCode() } |
Methods
getStatus | Gets the status of pending transactions. See the authenticateUsingConsent and authenticateUsingUserPin methods for more information. |
getTransactionId | Gets the transaction ID. |
getAttemptAgain | Returns true if the user enters an incorrect PIN, while the user has more retry attempts to complete the authentication.
If this method returns true, then the app should display the authentication prompt again. |
getErrorCode | Gets the Error code value. |
Class AutoEnrollmentResponse
The AutoEnrollmentResponse class contains information about the enrollment details for a replacement card. An object of this class is sent in the response of the autoEnrollAccount method.
public class AutoEnrollmentResponse { public AutoEnrollmentResponse() public AutoEnrollmentResponse(String transactionId, String status, String errorCode) public String getTransactionId() public String getStatus() public String getErrorCode() } |
Methods
Name | Description |
AutoEnrollmentResponse | Constructor. |
AutoEnrollmentResponse | Parameterized constructor. |
getTransactionId | Gets the transaction ID. |
getStatus | Gets the status of pending transactions. See the following methods for more information: |
getErrorCode | Gets the error code value. |
Class CancelTransactionResponse
The CancelTransactionResponse class contains information about the results of a Cancel Transaction operation. An object of this class is sent in the response of the cancelTransaction method.
See the cancelTransaction method for more information.
Java Code Snippet
public class CancelTransactionResponse {public String getStatus() public String getTransactionId() public String getErrorCode() } |
Methods
getStatus | Gets the status of the Cancel Transaction operation. See the cancelTransaction method for more information. |
getTransactionId | Gets the transaction ID. |
getErrorCode | Gets the Error code value. |
Class AccountActivationDetails
The AccountActivationDetails class contains account activation details. An object of this class is sent in the response of the verifyActivation (for a single account) method.
See the verifyActivation method for more information.
Java code snippet
public class AccountActivationDetails {public String getAccountId() public String getDisplayName() public String getStatus() public String getErrorCode() public String isPinRequired() } |
Methods
getStatus | Gets the status of account activation. For more information, see the verifyActivation method (for a single account). This is an overloaded method. |
getDisplayName | Gets the account display name. |
getAccountId | Gets the account ID of the activated account. |
getErrorCode | Gets the Error code value. |
isPinRequired | Returns true if the PIN is required. Otherwise, returns false.
If this method returns true, then the app must display a prompt for the user to submit the PIN or biometric. |
Class AccountsActivationDetails
The AccountsActivationDetails class contains account activation details for multiple accounts. An object of this class is sent in the response of the verifyActivation method (for multiple accounts).
Java code snippet
public class AccountsActivationDetails {public List<ActivationResponse> getAcctActivationResponses() public String getErrorCode() public String getStatus() public boolean isPinRequired() } |
Methods
getAcctActivationResponses | Gets a list of ActivationResponse objects .See Class ActivationResponse for more information. |
getErrorCode | Gets the Error code value. |
getStatus | Gets the account ID of the activated account. |
isPinRequired | Returns true if the PIN is required. Otherwise, returns false.
If this method returns true, then the app must display a prompt for the user to submit the PIN or biometric. |
Class AccountDeletionResponse
The AccountDeletionResponse class contains information about the results of an Account Deletion operation. An object of this class is sent in the response of the deleteAccount method.
See the deleteAccount method for more information.
Java Code Snippet
public class AccountDeletionResponse {public String getStatus() public String getDisplayName() public String getErrorCode() } |
Methods
getStatus | Gets the status of account deletion. See the deleteAccount method for more information |
getDisplayName | Gets the account display name. |
getErrorCode | Gets the Error code value. |
Class ActivationAcknowledgementResponse
The ActivationAcknowledgementResponse class contains activation acknowledgement details.
An object of this class is sent in the response of the setPin method (during the activation process for a single account). See the setPin (for a single account) method for more information. This is an overloaded method.
A list of objects of this class is sent in the response of the setPin method (during the activation process for multiple accounts). See the setPin (for multiple accounts) method for more information.
Java Code Snippet
public class ActivationAcknowledgementResponse{public String getAccountId() public String getStatus() public String getDisplayName() public String getErrorCode() } |
Methods
getAccountId | Gets the account ID. |
getStatus | Gets the status of account activation. |
getDisplayName | Gets user account display name. |
getErrorCode | Gets the Error code value. |
Class ActivationResponse
The ActivationResponse object contains information about an account. An object of this class is sent in the response of the getAllEnrolledAccounts method.
See the getAllEnrolledAccounts method for more information.
Java Code Snippet
public class ActivationResponse {public String getAccountId() public String getDisplayName() public String getErrorCode() public String getReferenceId() public String getStatus() } |
Methods
getAccountId | Gets the account ID. |
getDisplayName | Gets the user account display name. |
getErrorCode | Gets the Error code value. |
getReferenceId | Gets the reference ID. |
getStatus | Gets the status of account activation. |
Class UpdateAuthenticationResponse
The UpdateAuthenticationResponse class contains information about the results of an Update Authentication Type operation. An object of this class is sent in the response of the updateAuthenticationType method.
See the updateAuthenticationType method for more information.
Java Code Snippet
public class UpdateAuthenticationResponse { public String getStatus() public String getError_code() } |
Methods
getStatus | Gets the status of authentication type update. See the updateAuthenticationType method for more information |
getError_code | Gets the Error code value. |
Class AccountDetails
The AccountDetails contains information about an account. An object of this class is sent in the response of the getAllEnrolledAccounts method.
See the getAllEnrolledAccounts method for more information.
Java Code Snippet
public class AccountDetails {public String getAccountType() public String getAccountId() public String getDisplayName() } |
Methods
getAccountId | Gets the account id value. |
getDisplayName | Gets user account display name. |
getAccountType | Gets the account type value. |
Class OTPResponse
The OTPResponse class contains information about an OTP. An object of this class is sent in the response of the generateOTP method.
See the generateOTP method for more information.
Java code snippet
public class OTPResponse {public String getOtp() public String getStatus() public String getErrorCode() } |
Methods
getOtp | Gets the OTP value. |
getStatus | Gets status of generateOTP method. See the generateOTP method for more information. |
getErrorCode | Gets the Error code value. |
Class VerifyPinResponse
The VerifyPinResponse class contains information about the results of the Verify PIN operation. An object of this class is sent in the response of the verifyPin method.
See the verifyPin method for more information.
Java code snippet
public class VerifyPinResponse {public String getStatus() public String getErrorCode() public String getTransactionId() } |
Methods
getStatus | Gets status of verifyPin method. See the verifyPin method for more information. |
getErrorCode | Gets the Error code value. |
getTransactionId | Gets the transaction ID. |
Class ChangePinResponse
The ChangePinResponse class contains information about the results of the Change PIN operation. An object of this class is sent in the response of the changePin method.
See the changePin method for more information.
Java code snippet
public class ChangePinResponse {public String getStatus() public String getErrorCode() } |
Methods
getStatus | Gets status of changePin method. See the changePin method for more information. |
getErrorCode | Gets errorCode value. |
Class ProfileInfo
The ProfileInfo class contains information about the device.
See the getProfileInfo method for more information.
Java code snippet
public class ProfileInfo {public String getDeviceNickname() public String getDeviceId() public String getStatus() public String getErrorCode } |
Methods
getStatus | Gets status of getProfileInfo method. See the getProfileInfo method for more information. |
getErrorCode | Gets errorCode value. |
getDeviceId | Gets the Device’s profile id value. |
getDeviceNickname | Gets the Device’s Nickname value. |
Localizing the Biometric Authentication Dialog Text
To localize the text that is displayed on the app for biometric authentication:
- Navigate to theresdirectory in your Android project.
- Create a new directory with the name format asvalues-depending on the language in which you want the localized text to be displayed on the app. For example, if you want to localize the text to French language, then create a directory called<locale_name>values-fr.
- You must create a file calledstrings.xmlin thevalues-directory. The<locale_name>strings.xmlfile must contain the text to be displayed by the app. By default, the product ships the app text in the en-US langauge, refer to thestrings.xmlfile inres/valuesdirectory for the English locale strings.
The following images show the text that can be localized and the corresponding methods that must be used for the text.