Skip to content

Conversation

@OS-pedrogustavobilro
Copy link
Contributor

@OS-pedrogustavobilro OS-pedrogustavobilro commented Oct 31, 2025

Description

This PR adds native timeout functionality to watchPosition.

Also, in order to allow more configurability in watchPosition, allow to configure an interval parameter, instead of using just the timeout. By default interval is equal to timeout, to maintain backwards-compatible behavior.

Context

https://outsystemsrd.atlassian.net/browse/RMET-4688

Type of changes

  • Fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Refactor (cosmetic changes)
  • Breaking change (change that would cause existing functionality to not work as expected)

Tests

Updated and added new unit tests to reflect the changes.

You may test with this sample Location App (updated 5 nov 2025) - apk file, or get the source code and build in Android Studio

Checklist

  • Code follows code style of this project
  • CHANGELOG.md file is correctly updated
  • Changes require an update to the documentation
    • Documentation has been updated accordingly

@OS-pedrogustavobilro OS-pedrogustavobilro self-assigned this Oct 31, 2025
@alexgerardojacinto
Copy link
Collaborator

Test results: I noticed that when adding a watch, receiving location updates, and then clearing the watch, it seems that the location service continues turned on (the icon for the location keeps showing in the status bar). I believe this didn't used to happen, so it might be something we want to look into.

@OS-pedrogustavobilro
Copy link
Contributor Author

@alexgerardojacinto thanks for reporting this. The native library was wrongly creating two watches, and so when calling clearWatch only one of them was being cleared, which caused the location updates to still remain.

Fixed in fed5bfe - if you'd like to review now 🙇

@alexgerardojacinto
Copy link
Collaborator

@OS-pedrogustavobilro I was re-testing it but I think the .apk file in the PR's description may need to be updated right?

@OS-pedrogustavobilro
Copy link
Contributor Author

@alexgerardojacinto apologies, forgot about that... Updated apk and zip files in PR description

@alexgerardojacinto
Copy link
Collaborator

@OS-pedrogustavobilro no worries, thank you!

Just tested it now and it now works properly on my end!

Copy link

@OS-ruimoreiramendes OS-ruimoreiramendes left a comment

Choose a reason for hiding this comment

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

Tested the apk on android studio emulator and it works fine.

@OS-pedrogustavobilro OS-pedrogustavobilro merged commit 6b95bba into main Nov 5, 2025
1 check passed
@OS-pedrogustavobilro OS-pedrogustavobilro deleted the feat/RMET-4688/timeout-native-watch branch November 5, 2025 16:04
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