Android Trust SDK Native Interface

This page describes all classes that represent the public API interface between mobile developer integrators and the Daon Trust SDK.

DaonTrustSDK

Method NameDescription
DaonTrustSDK(ComponentActivity activity, DaonEventListener listener)Default constructor that requires host activity and DaonEventListener as a Trust SDK event listener.
void start(DaonOptions options)Starts the onboarding flow with SDK options object.
void stop()Terminates the onboarding flow and triggers the failure callback with the event DaonEventCode.SDK_STOPPED_PROGRAMATICALLY``

DaonOptions

Field NameDescription
String serverUrlServer URL that will be used to initialize the Trust SDK.
Long initializationTimeoutThe allotted wait time for the Trust SDK to initialize. Default value is 10 seconds (10000L).
Boolean enableConsoleLogsOption to enable logs reported by the SDK.
String nfcLicenseOptional parameter that is used to set the NFC SDK license file name.
String qrInstructionLabelDescription label in QR scan screen. If not set, the label will not be shown.
String spinnerLabelOptional parameter that is used to set the custom spinner label that will be shown beneath the progress while Daon Trust SDK is loading.
Boolean whitelistCheckEnabledOptional parameter that should be used to enable/disable whitelisted URLs check.
Boolean webLoadedCheckEnabledOptional parameter that is used to enable/disable waiting for webLoaded() callback.
Boolean isAnalyticsEnabledOptional parameter that indicates whether analytics events collection feature is enabled/ disabled. Default value: TRUE
String (nullable) statusBarColor

Optional parameter that is used to change the color of the status bar. Accepts a hex color value as a String, supporting ARGB (Alpha, Red, Green, Blue) format.

example: "#00FFAABB". Default value is null.

String progressBarTintColor

Optional parameter used to change the color of the loading spinner. Accepts a hex color value as a String, supporting ARGB (Alpha, Red, Green, Blue) format.

example: "#00FFAABB". Default value is "#2B95E7".

DaonEventListener

Method NameDescription
void onFail(DaonEvent event)

Termination event - This will be triggered if a critical event occurs and the user is unable continue the flow. Additional data will be

provided through the event object.

void onInfo(DaonEvent event)This event allows the integrator to monitor the SDK’s progress, including events like BACK_BUTTON_PRESSED``, triggered whenever the back button is pressed.
void onSuccess(String description)This method receives a parameter that contains a message from the WebApp. The message can carry any information the WebApp chooses to provide. While it often includes the status of the onboarding submission, the parameter is not limited to status and may represent other forms of data as needed.

DaonEvent

Field NameDescription
DaonEventCode codeField that contains event code.
String descriptionField that contains description/reason of the event.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard