transistorsoft / transistorsoft/react-native-background-geolocation

[Bug]: Distance Mismatch Between Actual Distance and SDK Distance

Open
#2,647 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug stale
Dominant language
TypeScript
Stars
2.9k
Forks
446
PR merge metrics
No merged PRs in 30d

Description

Required Reading
  • Confirmed
Plugin Version

5.1.1

Mobile operating-system(s)
  • iOS
  • Android
Device Manufacturer(s) and Model(s)

Samsung A36

Device operating-systems(s)

Android 16

React Native / Expo version

0.85.3

What happened?

The distance is not being calculated accurately while the user is moving. There is a noticeable difference between the actual walking distance and the distance returned by the SDK.

Plugin Code and/or Config
const DISTANCE_FILTER_METERS = 3;
const DESIRED_ODOMETER_ACCURACY_METERS = 20;

geolocation: {
      desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
      distanceFilter: DISTANCE_FILTER_METERS,
      disableElasticity: true,
      desiredOdometerAccuracy: DESIRED_ODOMETER_ACCURACY_METERS,
      locationUpdateInterval: 3000,
      fastestLocationUpdateInterval: 1000,
      activityType: BackgroundGeolocation.ACTIVITY_TYPE_FITNESS,
      pausesLocationUpdatesAutomatically: false,
      locationAuthorizationRequest: 'WhenInUse',
      showsBackgroundLocationIndicator: true,
    },
Relevant log output

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the distance mismatch with the reported React Native configuration on the listed devices and operating systems, then collect relevant SDK logs; the issue currently provides no log output or named source files. Done means the discrepancy is reproduced and its cause or an agreed expected-distance behavior is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, ios, react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.