Android General Setup
HYPR SDK for Android v2 is ready to be integrated with your application.
Adding the HYPR Libraries
Here are the steps to add HYPR libraries to your project:
-
Add the HYPR libraries to your project.
-
In your Android Studio Project go to Project Navigator.
-
Go to the Project view.
-
Add the Android
.aarfiles into theapp/libsdirectory.
This is how your configuration should look like:
Reference the Android Libraries
Here are the steps to reference Android Libraries from the app/build.gradle file:
-
Add the following code to the root level of
app/build.gradlefile -
Specify the version of the HYPR SDK and the crypto library. In the example code, the HYPR SDK version is 6.11.2 and the crypto version is 3.7.0. Please use whichever version of the HYPR Frameworks are provided.
ext {
hyprVersion = "6.11.2"
cryptoVersion = "3.7.0"
} -
Ensure that the Android
minSDKversion is 23,multiDexEnabledis true, and thendk abiFiltersare specified.defaultConfig {
applicationId "<your application id>"
minSdk 23
targetSdk 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true // Gets past the 65,536 method limit that can be referenced in a single DEX file
ndk {
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
// Restricts the set of ABIs that the application supports.
}
} -
Reference the HYPR SDK
.aarfiles in theapp/libsfolder.allprojects {
repositories {
jcenter()
flatDir {
dirs 'libs'
}
}
} -
Reference the HYPR libraries.
//Long dependencies block here
Issues
If you encounter the issue shown below, it can be resolved by updating the settings.gradle file.
dependencyResolutionManagement {
// Comment this out
// repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
}
}
rootProject.name = "<Your root project name>"
include ':app'
Next Steps
For your next steps, you can refer to the following documents: