Android SDK - Preferences Module
DOCS
Last updated: Aug 15th, 7:12am
The preferences module of the SDK exposes the functionality for user-configurable application settings. The developer can use these methods of allow users to set optional behavior for their instances of the application.
Service | Description |
---|---|
UI Services | com.paydiant.android.ui.service.preference.PreferenceService |
Core Services | com.paydiant.android.core.facade.PreferenceManagerFacade |
Set UI Package Preference Service Listeners
Set an implementation of the applicable listener interfaces in the UI service class to receive the callback methods returned by the Paydiant service in response to the methods invoked by the Preference module of the SDK.
Item | Description |
---|---|
Set Preference Listener | void setTenantDataRetrievalListener (IPreferenceListener listener); com.paydiant.android.ui.service.preference.IPreferenceListener or an overridden instance of com.paydiant.android.ui.service.preference.PreferenceListenerAdapter |
Remove Listener | void removeListener(); Call this method from within the corresponding service class in order to remove the associated listener and set it to null. |
Timeout
Use this method to retrieve the wallet issuer’s specification for how long the app can be inactive before the user is automatically logged out.
Item | Description |
---|---|
UI Method | void getTimeoutValue(); |
Success | void onTenantTimeoutRetrievalSuccess(String timeout); timeout - The value representing the number of seconds the app can remain inactive before the user is logged out. |
Failure | void onTenantDataRetrievalError(PaydiantException exception); The failure callback returns an instance of PaydiantException for the preference module including relevant error codes. |
Core Method | Preference getTimeoutValue(); |
Returns | Raw output for the Preference results or relevant exception. |
Errors
When retrieving the issuer timeout value, the following errors are applicable:
Error | Description |
---|---|
403 | Access to the server is prohibited because the user is not logged in. |
500 | An unknown error occurred internally in the server. |