Repository navigation
Conversation
replace calls to deprecated apis annotate where needed for older APIs Migrate to LocationListenerCompat Mostly CoPilot, some manual changes and tweaks as well as manual comments.
so local/GithubActions version are aligned
TrackerGPS.onInit replaced the deprecated getProvider(GPS_PROVIDER) == null with !isProviderEnabled(GPS_PROVIDER), which also reports "not supported" when location is merely switched off. A component that is not supported at init is skipped when the tracker connects, so if RunnerUp was opened with location off and location was then switched on, the run recorded no GPS: 0 points, 0 m and 0 s, while the start screen showed a good fix from its own listener. Check whether the device has a GPS provider, as before, with LocationManagerCompat.hasProvider.
gerhardol
approved these changes
Oct 7, 2026
Owner
|
Could use some more Compat in GpsStatus too, will update before changing from draft |
gerhardol
force-pushed
the
feature/fix-deprecated
branch
from
October 11, 2026 20:32
2436309 to
bd0745c
Compare
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.
The new check,
LocationManagerCompat.hasProvider, returns false also when the location provider is temporarily turned off, which can lead to some odd results.Steps to reproduce:
Expected result: GPS being recorded.
Actual result: The app has already determined that there's no location available, which means there's no tracking. I get a run with 0 seconds and 0 meters.