Record first point when starting automatic recording#7045
Merged
grzesiek2010 merged 3 commits intogetodk:masterfrom Jan 23, 2026
Merged
Record first point when starting automatic recording#7045grzesiek2010 merged 3 commits intogetodk:masterfrom
grzesiek2010 merged 3 commits intogetodk:masterfrom
Conversation
This should be handled by components like LocationTracker to simplify MapFragment implementations.
seadowg
commented
Jan 23, 2026
| override fun startInput() { | ||
| inputActive = true | ||
| if (recordingEnabled && recordingAutomatic) { | ||
| locationTracker.warm(map!!.getGpsLocation()?.toLocation()) |
Member
Author
There was a problem hiding this comment.
I'd initially thought about entirely replacing the use of the MapFragment GPS integration with LocationTracker in GeoPolyFragment. To do that there are a few things we'd need to add to LocationTracker:
- It would need to be pausable to prevent background GPS system usage when not using automatic recording
- We'd need to be able to speed up/slow down the update interval to adapt to different automatic recording intervals
- There'd ideally be a smart way to switch between running as a background and foreground service: if the service can be paused, there's no need for it to be running as a foreground service all the time
For the moment, I think adding a way to "warm" the LocationTracker and deprecating the MapFragment GPS methods (so that it's clear we want to move away from them) gets us parity with the last release without take time away from further invalid polygon work.
grzesiek2010
approved these changes
Jan 23, 2026
|
Tested with Success! Verified on devices with Android 10 Verified cases: |
|
Tested with success Verified on Android 16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7041
Blocked by #7043Why is this the best possible solution? Were any other approaches considered?
Comments inline.
One note: I've avoided adding tests for the fix as I'll plan to follow up with changes to the
LocationTrackerdetailed at #7045 (comment) and add tests for the more ideal setup there.How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
Should just fix the issue! Not a large change here - does not need tested with different map engines.
Before submitting this PR, please make sure you have:
./gradlew connectedAndroidTest(or./gradlew testLab) and confirmed all checks still passDateFormatsTest