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

In app GPS status update error #80

Closed
licaon-kter opened this issue Dec 8, 2019 · 4 comments
Closed

In app GPS status update error #80

licaon-kter opened this issue Dec 8, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@licaon-kter
Copy link
Contributor

I guess I pressed BACK by mistake so I reopened the app, continued the share session.

The GPS Test app saw the used satellites and my location ok, the browser showed me as online and sending, but the app status was still orange "waiting for gnss fix"...and it didn't change to green in 15 mins.

@bilde2910
Copy link
Owner

That's strange. The service appears to still be running when exiting the app, and when the prompt appears to resume the session, it creates a duplicate location update service, sending all packets multiple times. Session timeout resulted in the app crashing. Will have to look into this; something definitely not working right.

@bilde2910
Copy link
Owner

Reproduced; fixed in v1.5.2. Related to #77, see that issue for an in-depth explanation.

@licaon-kter
Copy link
Contributor Author

licaon-kter commented Dec 15, 2019

Somehow related, latest HEAD with debug info, while outside it was ok, now inside, no gps, browser indicator says "10m ago", no entries in logcat (aka nothing to send if no gps lock, right?.....but in app indicator says "location sharing active!" in green...shouldn't it be "waiting for gnss fix" in orange instead?

/LE: so I open task manager, swipe the app (it's protected from killing, no worries..notification stays on), reopen the app....yup....orange "waiting for gnss fix" now

@bilde2910
Copy link
Owner

The location update service will request both coarse (network-based, WiFi and cell towers) and fine (GNSS-based, satellites) location updates when it starts. It then sends locations from the coarse provider, which get a fix almost immediately, until the fine location provider starts receiving data. When that happens, GNSS takes over and the network-based provider is disabled so the app doesn't keep sending coarse data as well.

The status label has several possible states:

  • "Waiting for GNSS fix..." (orange) - no location data has been received whatsoever
  • "Waiting for high accuracy fix..." (orange) - the coarse location provider is providing network-based location data, but there is no satellite GNSS fix yet, so the location fix has low accuracy
  • "Location sharing active!" (green) - A GNSS fix has been obtained from satellites and the coarse location provider is disabled

Swiping the app causes the service to be recreated when you open the app again, destroying the old location update listeners and creating two new ones; a new coarse listener and a new fine one. It will then use the coarse provider again until a GNSS fix is obtained as if you just started sharing. Most of the time, it goes the green state almost immediately, since the phone already has a fix.

When you're indoors, the fine location provider stops working, but the app doesn't fall back to using the coarse one. It will stop receiving updates, but doesn't realize, so it keeps the label green and thinks everything is OK.

When you swipe the app, the service restarts and forces it to fall back. I should probably add a setting that if the device hasn't received a GNSS location fix for at least (interval + 30) seconds since the last update, it falls back to network-based location until the GNSS provider starts working again.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants