Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates affected Kotlin Android samples to handle Location.speed, Location.horizontalAccuracy, and Location.verticalAccuracy returning NaN when unavailable, avoiding UI output like "NaN" and preventing downstream formatting issues.
Changes:
- Show “Unavailable” for indoor positioning horizontal accuracy when the value is not finite.
- Show “Unavailable” for NMEA horizontal/vertical accuracy when values are not finite (and only convert to feet when valid).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
samples/show-device-location-using-indoor-positioning/.../MainActivity.kt |
Guards horizontal accuracy formatting with isFinite() and displays an unavailable fallback. |
samples/display-device-location-with-nmea-data-sources/.../MainActivity.kt |
Treats non-finite horizontal/vertical accuracies as unavailable and avoids applying the feet conversion in that case. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ps-sdk-kotlin-samples into Erick/update-location-nan
…/java/com/esri/arcgismaps/sample/showdevicelocationusingindoorpositioning/MainActivity.kt Co-authored-by: Copilot <[email protected]>
gunt0001
approved these changes
Apr 9, 2026
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.
Description
Links and Data
Location.speed, Location.horizontalAccuracy, and Location.verticalAccuracy now return NaN when the corresponding value is not available from the underlying location source, this PR updates the usages to respond accordingly.
https://devtopia.esri.com/runtime/kotlin/issues/7536
What To Review
How to Test
Run affected samples