Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RMET-3680 OSInAppBrowserLib-Android - Don't try to resolve activity before opening URL #28

Merged
merged 3 commits into from
Sep 20, 2024

Conversation

alexgerardojacinto
Copy link
Collaborator

Description

  • This PR fixes an issue where some URLs aren't being open in Custom Tabs and the External Browser by removing the verification made with canOpenUrl.

  • Reasoning:

    • resolveActivity can return null even if the URL can actually be opened.
    • This means that some valid URLs won't be open in Custom Tabs or the External Browser.
    • To fix this behaviour, we can simply remove the verification made with canOpenUrl.
    • Even if something happens when trying to open the URL, that will be caught in the catch clauses, maintaining the current behaviour, as the error returned is the same.

Context

References: https://outsystemsrd.atlassian.net/browse/RMET-3680

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)

Platforms affected

  • Android
  • iOS
  • JavaScript

Tests

Tested in Android 15 (Pixel 7).

MABS 10 build: https://intranet.outsystems.net/MABS/BuildDetail.aspx?BuildId=82ce90ebd3fcd5c99dbdc8f6915324d50410b70a

Screenshots (if appropriate)

Checklist

  • Pull request title follows the format RNMT-XXXX <title>
  • 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

…rnal Browser

Context: resolveActivity can return null even if the URL can actually be opened. In the cases where it can't, that will be caught in the catch, maintaining the current behaviour, as the error returned is the same.

References: https://outsystemsrd.atlassian.net/browse/RMET-3680
@alexgerardojacinto alexgerardojacinto self-assigned this Sep 19, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 70%)

See analysis details on SonarCloud

@alexgerardojacinto
Copy link
Collaborator Author

alexgerardojacinto commented Sep 19, 2024

Note about code coverage on SonarCloud - We're aware that the SonarCloud configuration is currently broken, that's why it's giving 0% code coverage on a file that is actually being tested.

@alexgerardojacinto alexgerardojacinto merged commit fe71371 into development Sep 20, 2024
6 of 7 checks passed
@alexgerardojacinto alexgerardojacinto deleted the fix/RMET-3680/remove-resolve-activity branch November 11, 2024 15:46
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.

3 participants