From 2e5be6a4e41ef89975f9c3398223ed3121eb6fda Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 12 Apr 2023 20:58:58 -0700 Subject: [PATCH] Commit database when arriving at home. Since trkpt will stop capturing points, it will not reach the later part of the handler that commits when a new point is 30 seconds after the previous commit. --- app/src/main/java/net/voussoir/trkpt/TrackerService.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/net/voussoir/trkpt/TrackerService.kt b/app/src/main/java/net/voussoir/trkpt/TrackerService.kt index a9aa837..2be5483 100644 --- a/app/src/main/java/net/voussoir/trkpt/TrackerService.kt +++ b/app/src/main/java/net/voussoir/trkpt/TrackerService.kt @@ -292,6 +292,7 @@ class TrackerService: Service() { Log.i("VOUSSOIR", "Arrived at home.") arrived_at_home = System.currentTimeMillis() + trackbook.database.commit() } else if ( allow_sleep &&