Repository navigation
Add geolocation listening minimum distance - #35784
Conversation
Expose an explicit minimum distance option for foreground geolocation listening and wire it to the platform movement threshold APIs.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 35784Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 35784" |
Cover the default minimum distance value and shared foreground listening request validation.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Avoid ArgumentNullException.ThrowIfNull in shared geolocation code so the netstandard2.0 target compiles.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AI code review refresh for net11.0 targetHead reviewed: Verdict: LGTM (minor notes)Independent review of the diff and full changed files (Android/iOS-macOS/Windows/shared) before reading the PR narrative. The change adds Findings (high-signal)
Minor / optional
CIAt review time ConfidenceMedium-high on the shared/platform logic (read full files at head). Behavior-change note is the main thing to weigh. Automated non-binding review. Not an approval — I did not use |
Add the ArgumentOutOfRangeException XML docs to platform StartListeningForegroundAsync implementations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AI code review refresh for net11.0 targetHead reviewed: Verdict: LGTM (minor, non-blocking notes) — confidence: high. What changed since the prior markerThe only new commit is Independent assessment of the full change
Minor / non-blocking notes
CI note
Automated net11.0 fleet refresh (round 11). This is not an approval or merge authorization — no |
|
Heads-up for any future merge-forward/cherry-pick involving the service-release fix from #35783: both changes touch the same Android LocationManager.RequestLocationUpdates(provider, minTimeMilliseconds, (float)request.MinimumDistance, continuousListener, looper);This preserves the service-release behavior because |
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
Adds
GeolocationListeningRequest.MinimumDistanceso apps can explicitly control the movement threshold for foreground geolocation listening.The new property defaults to
0, preserving the new no-hidden-distance-filter behavior, and is wired to:LocationManager.RequestLocationUpdatesminimum distanceGeolocator.MovementThresholdCLLocationManager.DistanceFilter, mapping0toCLLocationDistance.FilterNoneThe existing desired accuracy value continues to configure platform accuracy and listener accuracy filtering.
Issues Fixed
Follow-up API for #22683
Validation
src/Essentials/test/UnitTests/Essentials.UnitTests.csprojsrc/Essentials/src/Essentials.csprojfornet11.0-ios26.4src/Essentials/src/Essentials.csprojfornet11.0-android36.1withTargetFrameworks=net11.0-android36.1Note: local
net11.0-android37.0build is blocked because Android API 37 is not installed locally.