Welcome! Sign in or Register to get your developer token.




Installation Connecting Reading Stats Types

Android SDK

Installation Connecting Reading Stats Types

React Native

Demo App



Taking Readings

To initiate a reading, call startCountdown on the BacTrackAPI object to begin the count-in.

Countdown Screen Blow Now Screen Keep Blowing Screen Analyzing Results Screen Results Screen

Starting a BAC test walks the user through 5 steps.

The test process consists of a five-phase series of delegate calls that your application will handle. Call startCountdown to start the test process. For each phase, the following methods on your delegate will be called:

  1. Warming Up -(void)BacTrackCountdown:(NSNumber *)seconds executionFailure:(BOOL)failure Note that this callback may be called multiple times. The seconds parameter is an estimate of the number of seconds until the next phase begins.
  2. Begin Blowing (void)BacTrackStart
  3. Keep Blowing (void)BacTrackBlow: This callback may be called many times during the time that the user is blowing into the BACtrack. The percentage parameter counts down, letting the user know how much longer they must blow before the breath sample is captured.
  4. Analyzing (void)BacTrackAnalyzing Results are being analyzed. When this callback is called, the user can stop blowing.
  5. Results (void)BacTrackResults:(CGFloat)bac The test is finished and the BAC results are delivered as the “bac” parameter.

API Reference

Start a BAC Test

-(BOOL)startCountdown Start the count-in until the user has to blow. This will result in a series of “BacTrackCountdown:” callbacks. Returns true on success.

Delegate Reference

Warming Up

-(void)BacTrackCountdown:(NSNumber*)seconds executionFailure:(BOOL)error The BacTrackCountdown callback informs the app of the number of seconds until the user will be requested to blow. We recommended conveying the countdown to the end user. error will be set to TRUE if the BAC sensor rejects the request.

Start Blowing

-(void)BacTrackStart When this is received, ask the user to start blowing.

Keep Blowing

-(void)BacTrackBlow:(NSNumber*)breathFractionRemaining Tell the user to continue blowing. The argument blowFractionRemaining ranges from 1.0 to 0 to inform the application of how much blow time or breath volume remains. We recommend conveying this as a percentage to the end user so that they know how much longer they have to blow.

Keep Blowing (Deprecated)

-(void)BacTrackBlow Tell the user to keep blowing. This call is deprecated and will not support newer devices. Use BacTrackBlow:(NSNumber) instead.


-(void)BacTrackAnalyzing The breath sample has been captured and BACtrack is analyzing the result.


-(void)BacTrackResults:(CGFloat)bac Result of the blow as a BAC percentage. For example, .08 %BAC is reported simply as the value .08.

Handling Errors

-(void)BacTrackError:(NSError *)error Called when an error occurs. See the “Types and Constants Reference” for information on error codes.