Getting Started With Android Trust SDK

Add the Trust SDK to your Gradle Project

  1. Copy the following AAR files to your module 'libs' folder. If you don't have a 'libs' folder then create one. New projects module 'libs' folder location should be 'My Application/app/libs'.

    1. daon-trust-sdk-1.0.x.aar
    2. com.daon.sdk.nfc-1.0.x.aar
  2. Open your module level Gradle settings file. New projects module Gradle settings location should be My Application/app/build.gradle.

  3. Make the ‘libs’ folder easily accessible. To do that, add the following lines to your ‘module’ level Gradle file:

Groovy
Copy

By default, you might not have any settings for repositories in your ‘module’ level ‘build.gradle’ file. If this is the case, you can simply add it to the end of the file outside any other objects. Also, it is possible that you already have flatDir { dirs 'libs' } in your repositories. In this case, no change is necessary. If you are using a newer gradle version, there may be a requirement to add flatDir support to the ‘settings.gradle‘ file. It should be located in the same folder as the project-level ‘build.gradle‘ file. In ‘settings.gradle‘ add following lines:

dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { //Posible some other repositories flatDir { dirs 'libs' } } }

  1. Add libraries for the Daon Trust SDK along with other necessary dependencies to your ‘module’ Gradle dependencies:
Groovy
Copy
  1. And finally, add proguard changes in case the minify option is enabled for your build, to ensure that all of the necessary classes for NFC SDK are present when the project is built:
Groovy
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard