Repository navigation
Open location settings from the GPS location services modal on Android - #103197
Conversation
…id and iOS Co-authored-by: Nicolás Bonet <NicolasBonet@users.noreply.github.com>
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🤖 Android test steps verification results: ✅ pass With device-wide Location off, the GPS "Open settings" button now opens the device Location settings page ("Use location") directly, not the top-level Settings page. Dismiss and returning to the app both worked with no crash. The PR's Tests section is still a TODO, so these steps come from the linked issue.
|
|
@NicolasBonet |
|
@MelvinBot add the proper QA steps to the PR description |
|
@ZhenjaHorbach Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
🚧 NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here. |
|
I added separate QA steps for each platform to the PR description, replacing "Same as tests":
I left the Tests section as it was. Step 6 there describes the old bug ("Device settings page is opened instead of…"), not the expected result. You may want to remove it or reword it. |
This comment has been minimized.
This comment has been minimized.
|
All yours @ZhenjaHorbach |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-10-07.at.16.37.40.movAndroid: mWeb ChromeScreen.Recording.2026-10-07.at.16.37.40.moviOS: HybridAppScreen.Recording.2026-10-07.at.16.28.50.moviOS: mWeb SafariScreen.Recording.2026-10-07.at.16.28.50.movMacOS: Chrome / SafariScreen.Recording.2026-10-07.at.08.58.05.mov |
Won't your changes open the app's settings where we don't have location services settings(not Privacy & Security > Location Services)? |
|
No. The app settings page is only a fallback. Normally the button opens Privacy & Security > Location Services. The change first opens You're right that Settings > Expensify can't turn on device-wide Location Services. The fallback is there so the button still does something. The old code had no fallback. When the fallback runsReact Native rejects
|
|
@ZhenjaHorbach what would be pending for the approval? 🤔 |
I will approve soon! |
|
Looks like there's no supported way to deep link to Privacy & Security → Location Services. Apple DTS confirmed it here I'd suggest we keep iOS as is and only ship the Android change ( |
|
@MelvinBot let's do this: #103197 (comment) |
…intent only Co-authored-by: Nicolás Bonet <NicolasBonet@users.noreply.github.com>
|
@NicolasBonet @roryabraham One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Done. The PR now changes Android only. iOS matches production again.
ESLint passes on the changed folder. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 roryabraham has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/roryabraham in version: 9.5.6-0 🚀
|
|
No help site update is needed. This bug fix only changes which Android settings page the Open settings button opens, and no help article describes that button or where it leads. |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.5.6-6 🚀
Bundle Size Analysis (Sentry): |







Explanation of Change
When device location services are off, the GPS trip "Location access required" modal's Open settings button sent users to the top-level device settings page. They then had to find the location toggle themselves.
This PR opens the location settings page directly on Android:
android.settings.LOCATION_SOURCE_SETTINGSinstead of the genericandroid.settings.SETTINGSintent. If the device can't handle that intent, it falls back toLinking.openSettings()(the app's settings page), so the button never does nothing.App-Prefs:GeneralandApp-Prefs:Privacy&path=LOCATIONopen the same Settings > Apps list.Web is unchanged (
openSettings/index.ts).Fixed Issues
$ #102961
PROPOSAL: #102961 (comment)
Tests
Offline tests
N/A
QA Steps
Android: Native
iOS: Native (regression)
Web / mWeb (regression)
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari