Added
- New Android 12 BLE permissions declared in library manifest per this article. See the demo app source for an example of how to request/manage the permissions.
Changed
- Breath test result now uses the max of all readings instead of the last stable reading. If the breath test only picks up ambient CO readings, it will return 0 even if the max is non-zero.
Changed
- Timings: initialization phase is now 14 seconds, and reading/stability phase is 6-16 seconds depending on stability (for a max of 30s).
Changed
- Stability now determines if breath test should finish early rather than as a pass/fail. Stability tolerance changed to +-1 PPM of the baseline, and 6 stable readings are required for the breath test to finish early.
Changed
- Breath test timer implementation improved; BLE operations no longer cause a delay on the timer. Timer period changed to 100ms, ensuring that each BLE read (which still happens every second) cannot deviate more than 100ms from when the read is supposed to happen.
Deprecated
- StatusCodeConstants.SUCCESS_FAILED_TO_STABILISE will no longer be emitted.
Additional Developer Notes
- Fixed wrong 'Added'/'Changed' badge colors being used in some changelog entries.
Added
- Allow user to directly manipulate CO sensor via enableSensor() and disableSensor().
Added
- New error codes ERROR_ZEROING_REQUIRED and ERROR_DEVICE_NOT_READY for when the SDK detects that the sensor needs to zero or is currently zeroing, respectively. All functions that interact with the CO sensor may return these error codes; see documentation.
Changed
- On initial connection: always enable the sensor, and if necessary, allow the sensor to zero out.
Changed
- Added callbacks to scanAndConnect() that may return new status codes SUCCESS, ZEROING (interim state), SUCCESS_NEEDS_RECOVERY, ERROR_SCAN_FAILED, ERROR_FAILED_TO_CONNECT, and ERROR_FAILED_TO_FINALIZE. See documentation for full description.
Changed
- Connection tracker fixed; was not returning 'false' when the connection object was disposed.
Changed
- Don't disconnect at the end of a breath test if the breath test status was SUCCESS or SUCCESS_FAILED_TO_STABILIZE.
Changed
- Removed duration argument from breath test; breath test should always run for a max of 30 seconds (but may run for shorter depending on stability phase; see timing diagram).
Additional Developer Notes
- 2.0.0.13 is the bugfixed version of 2.0.0.11 and 2.0.0.12.