Include the JitPack repository in your project's build file
// settings.gradle.kts
dependencyResolutionManagement {
repositories {
maven(url = "https://jitpack.io")
}
}
// settings.gradle
dependencyResolutionManagement {
repositories {
maven { url "https://jitpack.io" }
}
}
Add the dependencies to your app's build file
// build.gradle.kts
dependencies {
implementation("com.github.BACtrack:breathalyzer-sdk:${bactrack_sdk_version}")
}
// build.gradle
dependencies {
implementation "com.github.BACtrack:breathalyzer-sdk:${bactrack_sdk_version}"
}
If you previously installed the BACtrack SDK by downloading a zip, then delete the following file:
app/lib/BACtrackAPI.jar
Lastly, in app/build.gradle delete the following line:
implementation files('libs/BACtrackAPI.jar')
Following the official renaming of the SDK to Breathalyzer SDK, it is necessary to update the imports in the source files to use BreathalyzerSDK instead of BACtrackAPI after syncing the gradle files.
Moving forward, to use the SDK start using the implementation as described in the section: SDK installation
A demo application for the SDK can be accessed on the
Breathalyzer SDK Demo Github
repository.
This project serves as a valuable resource for reference purposes when implementing the SDK in your own
project.
It's highly recommend utilizing this demo as a reference to ensure a seamless integration into your
application.