-
Notifications
You must be signed in to change notification settings - Fork 277
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
Workout time starts when GPS is started instead of when workout is started #1170
Comments
I have this issue as well. Once the GPS is first started and has has a signal, the problem occurs for me if I leave the app (ex. return to the home screen, start another app on top of RunnerUp, or turn of the phone screen). It is like the GPS then gets disconnected, but the notification still shows the "Ready to start running!" message and when returning to the app, it is still in the "start" state. When starting the workout it seems GPS needs to get connected again before the workout is started (but as @samontab says the time is since the GPS first was started). EDIT: I have a Pixel 6 running Android 14. |
I've looked into this a bit more. I am still not sure it is exactly the same issue as @samontab, but after clicking the "Start GPS" button, the app stops receiving location updates if it is no longer in the foreground. I found it is a behavior change starting with Android 8. The video below demonstrates this by logging the time difference since the last location update (should be about once every second). For some devices, it seems it can take some time to start receiving location updates again. Perhaps when at a location with a poor GPS signal? If a user then clicks on the "Start" button before location updates are delivered again, this delay (between the last location when the app went to background and location updates starts again) gets added to the time (about 12 seconds in the video). When testing on an emulator running Android 7 (the version before the behavior change), the app works as expected as location updates never stops. If the user clicks on the "Start" button after location updates are being delivered again, the app works as expected. Possible fixes?
test.mp4 |
When time is started a location point with the last known location is logged. The time is replaced with the current system time. |
If you start the GPS but don't start the workout immediately afterwards, you will see that when you start running there is already some amount of time there. That's the time since the GPS started.
Ideally you would only start counting the workout time from the moment you press start, not when the GPS is started.
The text was updated successfully, but these errors were encountered: