GPS speedometer in 100% Kotlin — Hilt, Room, MVVM, repository pattern. Analog & digital gauges plus live map and trip history.
A small app with production-grade architecture: every layer — DI, persistence, location abstraction, state modeling — is built the way a large app would build it. Read the whole codebase in ten minutes.
- 🎛 Analog gauge — classic needle speedometer
- 🔢 Digital view — large numeric readout
- 🗺 Live map tab — route while you move
- 🧾 Trip history — distance, duration, top/average speed persisted in Room
- 📡 Real-time GPS speed via fused location provider
di/ Hilt modules (Location, Room)
repo/ TripRepo — single source of truth
room/ Trip entity · TripDao · SpeedoMeterDb
sealed/ TripState — explicit state modeling
ui/
├── main/ MainViewModel + analog / digital / map tabs (ViewPager)
└── history/ HistoryViewModel + adapter
utils/ LocationClient interface → DefaultLocationClient impl
- 100% Kotlin, coroutines-based location flow
- Hilt dependency injection throughout
- Repository pattern with Room persistence
- Interface-first design:
LocationClientabstraction keeps GPS testable/swappable - Sealed classes for trip state
git clone https://github.com/ProHussain/SpeedoMeter.gitOpen in Android Studio, sync, run on API 24+. Location permission required — real GPS signal (or emulator route playback) needed for movement.
- Screenshots & demo GIF
- Unit tests: ViewModel + TripRepo (fake LocationClient)
- Migrate UI to Jetpack Compose
- Speed-limit alerts
- CI build via GitHub Actions
Ghulam Hussain — Product Engineer · apps with 50M+ combined downloads LinkedIn · GitHub · Medium