Skip to main content
Version: Current

Building the Android app from source

The Android app lives in its own repository: cheinisch/Fahrtenbuch-Android. It is licensed under the GNU Affero General Public License v3.0.

Requirements​

  • Android Studio with AGP 9
  • JDK 17
  • Gradle 9 (the wrapper is included)

Build and install​

git clone https://github.com/cheinisch/Fahrtenbuch-Android.git
cd Fahrtenbuch-Android
./gradlew assembleDebug # build a debug APK
./gradlew installDebug # install on a connected device or emulator

Or open the project in Android Studio and run the app configuration.

The debug build points to http://10.0.2.2:3000/api/v1/ by default – the host machine as seen from the Android emulator. Start a local server (see installation) and the emulator can connect to it directly.

Architecture​

Single-activity app in Kotlin with Jetpack Compose and Material 3.

  • Offline-first: a Room database is the primary source of data. Trips are recorded locally and uploaded by a WorkManager job when a connection is available.
  • API client: Retrofit / OkHttp / Moshi against the server's REST API (/api/v1), with automatic token refresh.
  • Tracking: a foreground service records GPS points; a Bluetooth receiver starts and stops recordings for vehicles with an assigned device.
  • Maps: MapLibre Native with OpenFreeMap vector styles (no API key). The style URLs are in ui/map/TripRouteMap.kt if you want to use your own tiles.
  • Time zones: timestamps are stored in UTC; each trip keeps the IANA time zone at start and end.

Tech stack: Kotlin · Jetpack Compose · Material 3 · Navigation Compose · Room · WorkManager · DataStore · Retrofit / OkHttp / Moshi · Play Services Location · MapLibre Native · ZXing · AndroidX Credentials (passkeys) · AboutLibraries.

Contributing​

Issues and pull requests are welcome in the app repository. All user-facing strings must exist in English (values/strings.xml) and German (values-de/strings.xml). See the repository's README and changelog for details.