Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First location update is invalid sometimes #2227

Open
mcottingham opened this issue Dec 11, 2024 · 6 comments
Open

First location update is invalid sometimes #2227

mcottingham opened this issue Dec 11, 2024 · 6 comments
Labels

Comments

@mcottingham
Copy link

Your Environment

  • Plugin version: 4.17.5
  • Platform: iOS
  • OS version: 15.8.3
  • Device manufacturer / model: iPhone 15 pro
  • React Native version (react-native -v): 0.74.5
  • Plugin config
        BackgroundGeolocation.ready({
            //Debug
            debug: false,
            logLevel: BackgroundGeolocation.LOG_LEVEL_ERROR,

            //GeoLocation
            desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
            preventSuspend: true,
            stationaryRadius: 25,
            heartbeatInterval: 60,
            showsBackgroundLocationIndicator: true,

            //Application
            startOnBoot: true,
            stopOnTerminate: false,
            enableHeadless: true,

            //Notification
            foregroundService: true,
            notification: {
                title: "Be Safe - On Shift",
                text: "Be Safe is monitoring your location, keeping you safe.",
                color: theme.palette.green,
                sticky: true,
            },

            locationAuthorizationRequest: "Always",
            backgroundPermissionRationale: {
                title: "Allow Be Safe - Work Alone to access this device's location in the background?",
                message: "In order to track your activity in the background, please enable Allow all the time location permission",
                positiveAction: "Change to Allow all the time",
                negativeAction: "Cancel",
            }
        })

Expected Behavior

The app report accurate location and accuracy

Actual Behavior

The first location provided by the library sometimes is wildly invalid reporting in the ocean (0.000, -109.298) with an accuracy of 5m.
image

We are unsure how to filter this location update, apart from the fact the latitude is 0.000, as the accuracy reported is 5m. We'd prefer not to have to put one off cases into our filter for things like "is the latitude or longitude 0.00?", kinda smells.

We are also still seeing that the device intermittently will stop tracking entirely, despite moving.
image

You can see in some cases, the user drove along the same route, but the tracking ceased for a while. Originally we thought this was related so cellular dead zones, but examining the route closer, I can see that the user backtracked along the same path. One direction it tracked decently, the other it skipped a large path. Also across days, I can see that there aren't dead zones along the path in most cases.

Steps to Reproduce

  1. Start location tracking
@christocracy
Copy link
Member

I’ve never heard of this case.

@christocracy
Copy link
Member

Apple themselves might eventually fix this in a future update. There’s no reason they should return a location having 0 latitude || longitude

@mcottingham
Copy link
Author

Ok, I'm not sure what I should tell my customers in this case.

Also, any insight on why the tracking stops as show in the picture attached?

@christocracy
Copy link
Member

Ok, I'm not sure what I should tell my customers in this case.

In the meantime. You should be adding a filter to your data.

Also, any insight on why the tracking stops as show in the picture attached?

Without logs, impossible to say.

I’ve been keeping a close eye on my daily field-testing with 2 iOS devices (and 4 Android — I carry a backpack of devices almost everywhere I go). I’m not seeing anything unusual with the demo app.

@mcottingham
Copy link
Author

We have a lot of users that operate in areas with poor or no cellular coverage. I'm starting to think that the transition from in-service to out-of-service is having an impact, but I can't seem to accurately correlate that either. Obviously in areas with no signal the device won't be able to report it's location, so I'd expect to see a gap in path. The gaps we see aren't consistent tho. One day the path will be full along the route, the next day it will have gaps where yesterday it reported fine.

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants