This guide describes how to add AbleLib to your Android app.
Before you start, make sure you have a valid licence key. If you don't have one, please follow these instructions.
Go to your project level build.gradle and add the AbleLib Maven repo to it:
allprojects {
repositories {
...
maven {
url 'https://repo.repsy.io/mvn/codecons/ablelib'
}
}
}
Then, add the AbleLib dependency to your module build.gradle:
dependencies {
...
implementation "com.ablelib:ableLib:1.0.0"
}
Also, add the following options to the same file to make sure your code is compatible with that of the library:
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
Lastly, open your app's AndroidManifest.xml and add the following meta-data to it:
<application
...>
<meta-data
android:name="com.ablelib.LICENCE_KEY"
android:value="INSERT_YOUR_LICENCE_KEY_HERE" />
</application>
That's it! Test the your installation by scanning for nearby devices.