Alcohol blood rate computer for driving.
This project was a fork of VincentAudibert/DriveSoberly, originally created by Vincent Audibert. It's now an independent project that modernizes dependencies, architecture, and BAC modeling while preserving license attribution.
- GitHub Releases (current distribution): https://github.com/JohanPy/DriveSoberly/releases
- F-Droid (planned for this fork package):
com.johanpy.drivesoberly
Current release assets include:
- a signed APK
- a SHA256 checksum file
See docs/fdroid-submission.md for submission and release checklist details.
DriveSoberly estimates whether you are fit to drive based on profile settings, consumed drinks, and legal limits.
Supported app languages:
- English
- French
- German
- Spanish
- Italian
Legal BAC coverage:
- 67 country profiles are bundled in the app
- if your country is not listed,
OTHERlets you define a custom legal BAC limit
The app displays:
- a clear status (safe to drive / not sober / do not drive)
- current estimated BAC
- estimated time to legal driving threshold
- estimated time to 0.00 g/L
The model considers:
- body weight
- sex
- declared tolerance profile
- legal context (country, young driver, professional driver)
- consumed drinks (volume, ABV, ingestion time)
- stomach state at drinking time
If your country is not available, select OTHER and define a custom legal BAC limit.
DriveSoberly uses a two-compartment pharmacokinetic model (stomach -> body) with linear hepatic elimination.
Each gram of alcohol is diluted across an effective body weight:
| Sex | Distribution ratio |
|---|---|
| Male | 0.70 |
| Female | 0.60 |
The model integrates two equations with 5-minute Euler steps:
Where:
-
$A_{stomach}$ is alcohol in stomach (g) -
$A_{body}$ is alcohol in body (g) -
$k_a$ is absorption rate (h$^{-1}$) -
$\beta_{mass} = \beta \times W_{eff}$ is elimination (g/h)
BAC at time
Food slows absorption and shifts peak BAC later.
| Stomach state | Example foods |
|
Lag |
Typical impact |
|---|---|---|---|---|
| Empty | - | 2.0 | 0.25 | highest and earliest peak |
| Light snack | chips, fruit, crackers, cheese | 1.2 | 0.40 | lower and delayed peak |
| Full meal | pasta, rice, pizza, meat, burger | 0.6 | 0.75 | much lower and later peak |
This app is not a medical or legal device. BAC is always an estimate. If in doubt, do not drive.
Contributions are welcome for:
- translations
- legal data corrections
- UI improvements
- code quality and tests
Open an issue or submit a pull request: https://github.com/JohanPy/DriveSoberly/issues/new/choose
- Android Studio Ladybug or newer
- Java 17
- Android SDK platform 35
./gradlew clean assembleDebug./gradlew ktlintCheck testDebugUnitTest connectedDebugAndroidTest./gradlew clean assembleReleaseRelease signing is performed in CI for tagged releases.
- Tag format:
vMAJOR.MINOR.PATCH(example:v1.0.0) versionNamefollows semantic versioningversionCodeincrements each public release- main branch:
master
- Merge only when CI is fully green.
- Update version metadata and changelog.
- Push a SemVer tag to trigger the signed release workflow.
- Publish APK, SHA256 checksum, and release metadata on GitHub Releases.
- Reuse the same tagged source for F-Droid submission.
Release notes are tracked in CHANGELOG.md.
Some parts of this project have been generated using AI tools for debugging, code completion, refactoring, or test generation.