fix: Return error when user does not turn on location#12
Merged
Conversation
With enableLocationManagerFallback=true Discovered while testing https://outsystemsrd.atlassian.net/browse/RMET-5198
Collaborator
|
Tested with Pixel 9 Pro XL and everything seems to work well, approving! |
alexgerardojacinto
approved these changes
Jun 15, 2026
This was referenced Jun 15, 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
Fixes a bug that was causing the
IONGLOCRequestDeniedExceptionto not be returned to the consumer whenenableLocationManagerFallback=true.The issue this was causing is as follows:
Prior to this PR, with
enableLocationManagerFallback=true, the library was still trying to retrieve the location, causing the method to hang until timeout. Now, the correctIONGLOCRequestDeniedExceptionis propagated outwards (as it was already withenableLocationManagerFallback=false.The PR also has some minor fixes on formatting and fixing an Android Studio warning.
Context
Discovered while working on https://outsystemsrd.atlassian.net/browse/RMET-5198, although not related to that task.
It's likely this is a bug introduced in 2.0.0 when
enableLocationFallbackwas introduced.Type of changes
Tests
Refer to the unit test I had that confirms the behavior is now fixed.
To test with an actual app, refer to this OutSystems O11 apk where the issue is fixed: https://drive.google.com/file/d/1HjjVgCTuxLGLuAKL_hZG_9mRMMIB_GXe/view?usp=sharing
To compare the behavior previously, feel free to repeat steps 1-4 with any other app that uses the location plugin (be it OutSystems or Capacitor) - E.g. the ODC one
Checklist