Installing sensitivity.io on Android

Here are the steps needed to integrate sensitivity.io into your android project:

1. Import the libraries

In Android Studio go to File -> New -> New Module -> Import .JAR/.AAR Package and import each library from the lib folder. These are:

  • sensitivityio-android-utils-1.0.0.aar
  • sensitivityio-android-base-1.1.4.arr
  • sensitivityio-android-license-1.1.4.aar
  • sensitivityio-android-sds-1.1.4.aar

Next open the settings.gradle file and make sure each model is included. You should have something like this:

1
include ':app', ':sensitivityio-android-utils-1.0.0', ':sensitivityio-android-base-1.1.4', ':sensitivityio-android-license-1.1.4', ':sensitivityio-android-sds-1.1.4'

2. Add the dependencies

In you app’s build.gradle file add the following dependencies:

1
2
3
4
5
6
7
dependencies {
    implementation project(path: ':sensitivityio-android-utils-1.0.0')
    implementation project(path: ':sensitivityio-android-base-1.1.4')
    implementation project(path: ':sensitivityio-android-license-1.1.4')
    implementation project(path: ':sensitivityio-android-sds-1.1.4')
    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
}

Note that we’re using retrofit for communication with the server. This should be downloaded and integrated automatically from jcenter. If it doesn’t, make sure you have jcenter added to repositories in your project’s build.gradle file.

1
2
3
repositories {
    jcenter()
}

3. Sync and build

Sync your project, then go to Build -> Make Project and you’re ready to go. You can find the android documentation here to get started.