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 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';