This demo demonstrates the BACtrack SDK bridge for iOS, Android and React Native. For SDK documentation, visit https://developer.bactrack.com/
In order to start testing, you need to add your API key to BactrackModule.h for iOS or BactrackModule.java for Android.
After that, you can follow the next steps:
- Tap on
Request permissionsin order to request Location and Bluetooth permissions - Tap on
Initializein order to begin scanning for nearby devices. - Turn on your breathalyzer.
- Once the nearby device is discovered, tap on
Connect Breathalyzerto establish a connection. - You can now fetch information such as the serial number or battery status.
- Additionally, you can also tap on
Start Test Countdownto start taking a test
This project serves as reference on how add the SDK to a React Native project. Here are some steps that needs to be followed to do perform the integration
For reference on how to install the Android SDK, visit the native Github page of the SDK: https://github.com/BACtrack/breathalyzer-sdk-android
- Run
yarn start - Once the server starts run
yarn android
For reference on how to install the iOS SDK, visit the native Github page of the SDK: https://github.com/BACtrack/breathalyzer-sdk-ios
- Open the project file with the extension .xcworkspace
- Add your signing configs to Xcode
- cd to
iosfolder runpod install - Run
yarn start - Once the server starts run
yarn ios