Add the SDK to Your App
The recommended development environment is:
- Google Android Studio® (latest available version)
- The minimum Android SDK API level supported is 21 (Android 5.0)
However, if you want to leverage biometric authentication features, API level 23 (Android 6.0) is required.
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
- Copy the HID Approve SDK library to your app classpath.
- Add the SDK dependencies to your app classpath.
The following gradle snippet provides the list of dependencies:
dependencies {
// sl4j module
implementation group: 'org.slf4j', name: 'slf4j-api',version: '1.7.26'
implementation 'com.github.tony19:logback-android-classic:1.1.1-6'
// https://mvnrepository.com/artifact/net.minidev/json-smart
implementation group: 'net.minidev', name: 'json-smart', version: '2.4.7'
// https://mvnrepository.com/artifact/net.sourceforge.jregex/jregex
implementation group: 'net.sourceforge.jregex', name: 'jregex', version: '1.2_01'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.3'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.12.3'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.12.3'
implementation('com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.12.3') {
// exclude group: 'jakarta.activation'
}
// https://mvnrepository.com/artifact/com.nimbusds/oauth2-oidc-sdk
implementation('com.nimbusds:oauth2-oidc-sdk:5.63') {
exclude group: 'net.minidev'
exclude group: 'javax.activation'
}
// https://mvnrepository.com/artifact/com.nimbusds/nimbus-jose-jwt
implementation('com.nimbusds:nimbus-jose-jwt:8.2.1') {
exclude group: 'net.minidev'
}
// https://mvnrepository.com/artifact/com.nimbusds/lang-tag
implementation group: 'com.nimbusds', name: 'lang-tag', version: '1.4.3'
// Google Android Platform
implementation "androidx.appcompat:appcompat:1.4.1"
implementation "androidx.appcompat:appcompat-resources:1.4.1"
implementation "com.google.firebase:firebase-messaging:23.0.0"
implementation "androidx.biometric:biometric:1.1.0"
// HID Approve SDK
implementation fileTree(include: ['*.aar'], dir: 'libs’)
}