Skip to content

Colota - Android GPS Location tracker

Align battery threshold and fix outdated docs

Max Dietriche036a6e39597
diff --git a/apps/docs/docs/development/architecture.md b/apps/docs/docs/development/architecture.md
index e5835c10..e91df5fb 100644
--- a/apps/docs/docs/development/architecture.md
+++ b/apps/docs/docs/development/architecture.md
@@ -57,7 +57,7 @@ All native code lives in `apps/mobile/android/app/src/`, organized by build flav
The primary React Native bridge module (exposed as `"LocationServiceModule"`). Handles all JS-to-native communication for:
- Service control (`startService`, `stopService`)
-- Database queries (`getStats`, `getTableData`, `getLocationsByDateRange`, `getQueuedLocationsCount`)
+- Database queries (`getStats`, `getTableData`, `getLocationsByDateRange`)
- Geofence CRUD operations
- Settings persistence
- Device info, file operations, authentication
@@ -85,7 +85,7 @@ An Android foreground service that runs continuously for GPS tracking. Manages:
- GPS location capture via the `LocationProvider` abstraction
- Pause zone detection (geofencing)
-- Battery critical shutdown (1-4% while discharging)
+- Battery critical shutdown (below 5% while discharging)
- Location accuracy filtering
- Queuing data for server sync
diff --git a/apps/docs/docs/development/local-setup.md b/apps/docs/docs/development/local-setup.md
index 0f3f1131..0c54d951 100644
--- a/apps/docs/docs/development/local-setup.md
+++ b/apps/docs/docs/development/local-setup.md
@@ -121,7 +121,7 @@ colota/
│ │ │ ├── gms/java/com/colota/location/ # GMS implementation
│ │ │ └── foss/java/com/colota/location/ # Native implementation
│ │ ├── src/
-│ │ │ ├── screens/ # 9 app screens
+│ │ │ ├── screens/ # 12 app screens
│ │ │ ├── components/ # UI and feature components
│ │ │ ├── hooks/ # Custom React hooks
│ │ │ ├── services/ # Native bridge services
diff --git a/apps/mobile/android/app/src/main/java/com/colota/service/LocationForegroundService.kt b/apps/mobile/android/app/src/main/java/com/colota/service/LocationForegroundService.kt
index 59daede0..f5d00969 100644
--- a/apps/mobile/android/app/src/main/java/com/colota/service/LocationForegroundService.kt
+++ b/apps/mobile/android/app/src/main/java/com/colota/service/LocationForegroundService.kt
@@ -361,7 +361,7 @@ class LocationForegroundService : Service() {
val (battery, batteryStatus) = deviceInfoHelper.getCachedBatteryStatus()
- if (battery in 1..4 && batteryStatus == 1) {
+ if (deviceInfoHelper.isBatteryCritical()) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "Battery critical ($battery%) during tracking - stopping")
}