Skip to content

Location properties might return NaN#465

Merged
eri9000 merged 9 commits intov.nextfrom
Erick/update-location-nan
Apr 9, 2026
Merged

Location properties might return NaN#465
eri9000 merged 9 commits intov.nextfrom
Erick/update-location-nan

Conversation

@eri9000
Copy link
Copy Markdown
Collaborator

@eri9000 eri9000 commented Apr 6, 2026

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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@eri9000 eri9000 changed the base branch from main to v.next April 7, 2026 18:32
Copy link
Copy Markdown
Collaborator

@shubham7109 shubham7109 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

eri9000 and others added 2 commits April 7, 2026 14:04
…/java/com/esri/arcgismaps/sample/showdevicelocationusingindoorpositioning/MainActivity.kt

Co-authored-by: Copilot <[email protected]>
@eri9000 eri9000 requested a review from sorenoid April 7, 2026 21:05
@gunt0001 gunt0001 requested review from gunt0001 and removed request for sorenoid April 9, 2026 17:03
Copy link
Copy Markdown
Collaborator

@gunt0001 gunt0001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eri9000 - looks good, some minor comments.

@eri9000 eri9000 merged commit 4526b72 into v.next Apr 9, 2026
1 check passed
@eri9000 eri9000 deleted the Erick/update-location-nan branch April 9, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants