From 9464cf4a7ff0ee534ad851eee4a357698bb20368 Mon Sep 17 00:00:00 2001 From: GCyganek Date: Thu, 17 Sep 2026 16:30:13 +0200 Subject: [PATCH 1/2] Lower distance interval for better GPS trip accuracy --- .../iou/request/step/IOURequestStepDistanceGPS/const.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/iou/request/step/IOURequestStepDistanceGPS/const.ts b/src/pages/iou/request/step/IOURequestStepDistanceGPS/const.ts index 48a9241b74ec..c86adcc09e1a 100644 --- a/src/pages/iou/request/step/IOURequestStepDistanceGPS/const.ts +++ b/src/pages/iou/request/step/IOURequestStepDistanceGPS/const.ts @@ -1,12 +1,13 @@ import type {LocationTaskOptions} from 'expo-location'; -import {Accuracy} from 'expo-location'; +import {Accuracy, ActivityType} from 'expo-location'; -const GPS_DISTANCE_INTERVAL_METERS = 100; +const GPS_DISTANCE_INTERVAL_METERS = 50; const BACKGROUND_LOCATION_TASK_OPTIONS: LocationTaskOptions = { accuracy: Accuracy.Highest, distanceInterval: GPS_DISTANCE_INTERVAL_METERS, + activityType: ActivityType.AutomotiveNavigation, }; const BACKGROUND_LOCATION_TRACKING_TASK_NAME = 'background-location-tracking'; From a3f734e9a7f6bf0322c923e2463f5dde3acde554 Mon Sep 17 00:00:00 2001 From: GCyganek Date: Thu, 17 Sep 2026 16:42:41 +0200 Subject: [PATCH 2/2] Fix tests --- jest/setup.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jest/setup.ts b/jest/setup.ts index 09de71c6a8ef..44fbb6e59862 100644 --- a/jest/setup.ts +++ b/jest/setup.ts @@ -79,6 +79,13 @@ jest.mock('expo-location', () => ({ Highest: 5, BestForNavigation: 6, }, + ActivityType: { + Other: 1, + AutomotiveNavigation: 2, + Fitness: 3, + OtherNavigation: 4, + Airborne: 5, + }, })); // Needed for: https://stackoverflow.com/questions/76903168/mocking-libraries-in-jest