From 7c36badf769a3f6e54855dd7f03d25af5434762c Mon Sep 17 00:00:00 2001
From: Santo Cariotti <santo@dcariotti.me>
Date: Fri, 18 Oct 2024 15:36:07 +0200
Subject: Increase `distanceInterval` value for location updates

---
 app/(tabs)/index.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'app/(tabs)/index.tsx')

diff --git a/app/(tabs)/index.tsx b/app/(tabs)/index.tsx
index 6344a22..8e52ee1 100644
--- a/app/(tabs)/index.tsx
+++ b/app/(tabs)/index.tsx
@@ -446,8 +446,8 @@ export default function HomeScreen() {
           }, 2000);
 
           await Location.startLocationUpdatesAsync(LOCATION_TASK_NAME, {
-            accuracy: Location.Accuracy.Balanced,
-            distanceInterval: 0,
+            accuracy: Location.Accuracy.Balanced, // ~100 meters of precision
+            distanceInterval: 10, // Send data only if they moved of >=10 meters
             deferredUpdatesInterval: 1000,
             showsBackgroundLocationIndicator: true,
             foregroundService: {
-- 
cgit v1.2.3-18-g5258

