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 Name | Description |
|---|---|
| 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 Name | Description |
|---|---|
| String serverUrl | Server URL that will be used to initialize the Trust SDK. |
| Long initializationTimeout | The allotted wait time for the Trust SDK to initialize. Default value is 10 seconds (10000L). |
| Boolean enableConsoleLogs | Option to enable logs reported by the SDK. |
| String nfcLicense | Optional parameter that is used to set the NFC SDK license file name. |
| String qrInstructionLabel | Description label in QR scan screen. If not set, the label will not be shown. |
| String spinnerLabel | Optional parameter that is used to set the custom spinner label that will be shown beneath the progress while Daon Trust SDK is loading. |
| Boolean whitelistCheckEnabled | Optional parameter that should be used to enable/disable whitelisted URLs check. |
| Boolean webLoadedCheckEnabled | Optional parameter that is used to enable/disable waiting for webLoaded() callback. |
| Boolean isAnalyticsEnabled | Optional 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 Name | Description |
|---|---|
| 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 Name | Description |
|---|---|
| DaonEventCode code | Field that contains event code. |
| String description | Field that contains description/reason of the event. |