Using the Android Trust SDK

This guide is written for developers who want to use the Trust SDK to add local (on-device) Onboarding capabilities to an Android application.

The developer needs a thorough knowledge of the Java and/or Kotlin programming language on the Android platform. It is also recommended that the developer has some understanding of TrustX Webview technology.

The minimum supported Android version is Android 5.

Initializing the Trust SDK

Java
Kotlin
Copy
  1. Daon Trust SDK offers setting a DaonOptions object for customization purposes. You can set your own initialization timeout as well as the URL of the environment that you want to use:
Java
Kotlin
Copy

f you do not set the DaonOptions object, default values will be used. Initialization timeout default value is '10000L'. By not setting the custom environment URL, you are requesting of the Daon Trust SDK to launch a QR code scanning feature which expects the QR code that carries the URL of your environment as a value.

  1. Finally, you can start the Onboarding process by calling 'start()' function of the TrustSDK:
Java
Kotlin
Copy

Obtaining and Parsing Events from the Trust SDK

As stated above, the Trust SDK returns events through the two callback methods ('onInfo()' and 'onFail()') that need to be overridden to initialize the SDK. Events that are returned are represented through the DaonEvent object instances that are carrying feedback information about the Onboarding process status and errors.

  • DaonEvent fields:
    • DaonEventCode code - field that contains event code
    • String description - field that contains a description of the event

A list of events, their codes and descriptions that are supported and provided by the Daon Trust SDK can be found below:

Event NameCodeDescription
qrScanInvalidQRCode200103Scanned QR code is not valid.
qrScanInterrupted200104QR scanning interrupted. Please try again.
webSessionExpired200401Web session for onboarding process has expired.
webAppTerminated200402Web application process terminated. This can occur when the end-user presses the back button to navigate to a previous screen when they are on the first web screen of the Process Instance.
webAppTimeout200403Web application process has timed out.
webSessionCompleted100403Web session for onboarding process completed successfully.
cameraPermissionDenied200501Camera permission denied.
noInternetConnection200502Internet connection not available.
versionNotCompatible200505DaonTrust SDK client version not compatible with server version.
urlNotWhitelisted200508Provided URL is not whitelisted.
webLoadingTimeout200509Web page failed to load in given time frame.
  • DaonEventCode structure breakdown:
    • First pair of digits represents event status. Event status can be: Success (10), Fail (20), Info (30).
    • Second pair of digits represents section of the event. Event sections can be: QR (01), MRZ (02), NFC (03), Web (04), Other (05).
    • Third pair of digits represents ordinal code number for that section.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard