The test process constists of a five-phase series of callbacks that your application will handle. Call
startCountdown
to start the test process. For each phase, the following methods on your delegate
will be
called:
Starting a BAC test walks the user through 5 steps.
The test process consists of a series of five phases. At the start of every phase your BacTrackAPIDelegate receives the following callbacks:
void BACtrackCountdown(int currentCountdownCount)
This callback will be called
repeatedly and the currentCountdownCount
parameter is an estimated number of seconds left until
the next callback (BacTrackStart
) is called.
void BACtrackStart()
void BACtrackBlow(float breathFractionRemaining)
This callback will be called
repeatedly during the time that the user is expected to blow into the BACtrack device.
void BACtrackAnalyzing()
When this callback is called, the user can stop blowing.
void BACtrackResults(float measuredBac)
public boolean startCountdown()
Start the count-in until the user has to blow. This will result in a
series of “BacTrackCountdown()” callbacks. Returns true on success.
void BACtrackCountdown(int currentCountdownCount)
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.
This method will be called multiple times.
void BACtrackStart()
When this is received, ask the user to start blowing.
void BACtrackBlow(float blowFractionRemaining)
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.
void BACtrackAnalyzing()
The breath sample has been captured and BACtrack is analyzing the result.
void BACtrackResults(float measuredBac)
Result of the blow as a BAC percentage. For example, .08
%BAC is reported simply as the value .08.
void BACtrackError(int errorCode)
Called when the BACtrack device encounters an error which results
in the test failing. See “Types and Constants Reference” for the list of possible error codes.