Add the SDK to Your App

View this page for | |

The recommended development environment is:

  • Google Android Studio® (latest available version)
  • The minimum Android SDK API level supported is 26 (Android 8.0)

The HID Approve SDK is delivered as an AAR file (HID_Approve_SDK.aar). It is available in the Android/Libraries folder of the delivery package.

Use the SDK in your App

  1. Copy the HID Approve SDK library to your app classpath.
  2. Add the SDK dependencies to your app classpath.

The following gradle snippet provides the list of dependencies:

Copy
dependencies {
    configurations.implementation {
        exclude group: 'javax.activation', module: 'activation'
    }
    
    // slfj logging
    implementation 'org.slf4j:slf4j-api:2.0.13'
    implementation 'com.github.tony19:logback-android:3.0.0'

    // https://mvnrepository.com/artifact/net.minidev/json-smart
    implementation 'net.minidev:json-smart:2.5.0'

    // https://mvnrepository.com/artifact/net.sourceforge.jregex/jregex
    implementation 'net.sourceforge.jregex:jregex:1.2_01'

    // https://mvnrepository.com/artifact/com.fasterxml.jackson.core
    implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.0'
    implementation 'com.fasterxml.jackson.core:jackson-annotations:2.17.0'
    implementation 'com.fasterxml.jackson.core:jackson-core:2.17.0'
    implementation 'com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.17.0'

    // https://mvnrepository.com/artifact/com.nimbusds
    implementation 'com.nimbusds:oauth2-oidc-sdk:11.10'
    implementation 'com.nimbusds:lang-tag:1.7'
    implementation 'com.nimbusds:nimbus-jose-jwt:9.37.3'

    // Google Android Platform
    implementation 'androidx.biometric:biometric:1.1.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'androidx.appcompat:appcompat-resources:1.6.1'
    implementation 'com.google.firebase:firebase-messaging:24.0.0'

    // Database
    implementation 'androidx.sqlite:sqlite:2.2.0'
    implementation 'net.zetetic:sqlcipher-android:4.5.6'

    // HID Approve SDK
    implementation fileTree(include: ['*.aar'], dir: 'libs')
}

Add Functions to your App

Managing Persistent Data

The HID Approve SDK stores it's persistent data in several databases in the Android application sandbox.

This persistent data can be removed by either:

  • Resetting the HID Approve SDK with the dedicated DeviceFactory.reset() method - all the data will be removed (existing containers, keys...)

  • Clear the data from the operating system using Settings > Apps > YourApp > Storage > Clear data

  • Uninstalling the application