Building AlertSpot: A Privacy-First Location Alarm for Android
Commuting on public transit comes with an everyday annoyance: falling asleep or getting absorbed in a book and missing your stop.
While location-based reminder apps exist, many require cloud accounts, track location telemetry, or aggressively drain battery by pinging continuous high-accuracy GPS in the background.
To solve this, I built AlertSpot — a lightweight, completely free, and open-source Android app that fires high-priority audio and full-screen alerts when you enter a destination geofence.
🏗️ Architecture & Core Tech Stack
- Language & UI: Kotlin, Jetpack Compose, Material Design 3
- Architecture: MVVM with ViewModel and StateFlow
- Maps & Tiles: OSMDroid (OpenStreetMap)
- Location & Geofencing: Google Play Services FusedLocationProvider + GeofencingClient
- Navigation & Serialization: Jetpack Navigation Compose, Gson
- Target SDK: Android 8.0 (API 26) up to Android 15 (API 35)
⚡ Technical Challenges & Solutions
1. Zero Google Maps API Costs (OSMDroid)
Instead of relying on commercial Google Maps billing/keys, AlertSpot uses OSMDroid for map rendering.
- Tile Caching: Caches up to 600 MB of OpenStreetMap tiles locally so maps load reliably even with unstable transit mobile data.
- Interactive Geofencing: Users can drop pins or search locations to define custom radius zones (in meters or kilometers) rendered directly on the map layer.
2. Battery-Smart Adaptive GPS Polling
Continuous location updates quickly drain battery on long trips. AlertSpot uses a dynamic polling mechanism:
- Far: When far from all active geofences, polling frequency drops to save power.
- Approaching: As distance shrinks, polling frequency scales up dynamically to guarantee detection precision.
- Dual Detection: Combines the Android Geofencing API with background timer distance checks to prevent dropped triggers.
3. Reliable Waking (Surviving Doze Mode & Reboots)
A transit alarm is useless if the system kills it or delays the notification due to Android Doze mode:
- Foreground Service: Runs a continuous foreground service with persistent notification status.
- Full-Screen Intent & Wake Lock: When triggered, it fires a full-screen alarm overlay with looping audio and vibration, waking the screen even if the device is locked.
-
Reboot Resilience: Listens for
BOOT_COMPLETEDintents to automatically re-register active geofences on device restart.
🔒 Privacy First
- No Accounts / Logins: No backend servers, analytics tracking, or telemetry.
- Local Storage: All locations and history logs remain strictly on the device.
📦 Try AlertSpot / Source Code
The code and pre-compiled APKs are publicly available on GitHub:
- 💻 GitHub Repository: vasanth-kandasamy/alert-spot-android
- 📦 Download APK Release: GitHub Releases
🚀 Supporting the Store Launch
I am an independent developer working to raise the one-time $25 Google Play Developer fee to release AlertSpot on the Play Store for non-technical users.
If you'd like to support the project, feel free to check out my Ko-fi page.
Pull requests, feedback, and architecture suggestions are always welcome!
Top comments (1)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.