From c722e7cad19e6afb50e929b78a0454dc6cabc7ce Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 5 Apr 2023 18:06:43 -0700 Subject: [PATCH] Let notification say (home) when at home. --- app/src/main/java/net/voussoir/trkpt/TrackerService.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/voussoir/trkpt/TrackerService.kt b/app/src/main/java/net/voussoir/trkpt/TrackerService.kt index 1347898..fa3f28c 100644 --- a/app/src/main/java/net/voussoir/trkpt/TrackerService.kt +++ b/app/src/main/java/net/voussoir/trkpt/TrackerService.kt @@ -390,7 +390,12 @@ class TrackerService: Service() if (trackingState == Keys.STATE_TRACKING_ACTIVE) { notification_builder.setContentTitle(this.getString(R.string.notification_title_trackbook_running)) - if (location_interval == Keys.LOCATION_INTERVAL_FULL_POWER) + if (location_interval == Keys.LOCATION_INTERVAL_FULL_POWER && arrived_at_home > 0) + { + notification_builder.setContentTitle("${timestamp} (home)") + notification_builder.setSmallIcon(R.drawable.ic_satellite_24dp) + } + else if (location_interval == Keys.LOCATION_INTERVAL_FULL_POWER) { notification_builder.setContentTitle("${timestamp} (recording)") notification_builder.setSmallIcon(R.drawable.ic_satellite_24dp)