The purpose of this SDK is to establish a connection with the BACtrack Breathalyzer products' SDK and enable users to take a test and obtain BAC results. Additionally, users can retrieve general information about the Breathalyzer, such as the serial number and battery.
For SDK documentation, visit https://developer.bactrack.com/
-
Include the JitPack repository in your project's build file
Kotlin DSL
// settings.gradle.kts dependencyResolutionManagement { repositories { maven(url = "https://jitpack.io") } }
Groovy
// settings.gradle dependencyResolutionManagement { repositories { maven { url "https://jitpack.io" } } }
-
Add the dependencies to your app's build file
Kotlin DSL
// build.gradle.kts dependencies { implementation("com.github.BACtrack:breathalyzer-sdk:${bactrack_sdk_version}") }
Groovy
// build.gradle dependencies { implementation "com.github.BACtrack:breathalyzer-sdk:${bactrack_sdk_version}" }
Clone this repository and make sure you're using the latest version available
In order to start testing, you need to add your API key to MainActivity.java
.
After that, you can follow the next steps:
- Run the app
- Turn on your breathalyzer.
- Tap on
Connect Breathalyzer
to establish a connection. - You can now fetch information such as the serial number or battery status.
- Additionally, you can also tap on
Start Test Countdown
to start taking a test
See video for usage reference below: