-
Notifications
You must be signed in to change notification settings - Fork 4
RMET-4335 - Migrate back navigation to API supported for Android 16 and update lib to Android 16 (API 36) #50
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
Merged
alexgerardojacinto
merged 7 commits into
main
from
fix/RMET-4335/migrate-back-navigation
Jul 30, 2025
Merged
RMET-4335 - Migrate back navigation to API supported for Android 16 and update lib to Android 16 (API 36) #50
alexgerardojacinto
merged 7 commits into
main
from
fix/RMET-4335/migrate-back-navigation
Jul 30, 2025
Conversation
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
Context: For apps targeting 16, onBackPressed no longer works, as it is no longer called. Instead, apps should migrate to the new back navigation APIs - for example, OnBackPressedCallback. More info here: https://developer.android.com/about/versions/16/behavior-changes-16#predictive-back References: https://outsystemsrd.atlassian.net/browse/RMET-4335
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ✅ code/snyk check is complete. No issues have been found. (View Details) |
Collaborator
Author
|
Note about Unit-Tests check failing: The tests are passing, but our SonarCloud configuration is broken and the check fails when it tries to send the test results to SonarCloud. |
...ain/java/com.outsystems.plugins.inappbrowser/osinappbrowserlib/views/OSIABWebViewActivity.kt
Outdated
Show resolved
Hide resolved
...ain/java/com.outsystems.plugins.inappbrowser/osinappbrowserlib/views/OSIABWebViewActivity.kt
Outdated
Show resolved
Hide resolved
Context: If it is false, it means we want to simply close the WebView and not navigate to the previous URL. This means that we can simply use predictive back navigation instead of handling this case in the `onBackPressedCallback` References: https://outsystemsrd.atlassian.net/browse/RMET-4335
OS-pedrogustavobilro
approved these changes
Jul 30, 2025
OS-ruimoreiramendes
approved these changes
Jul 30, 2025
12 tasks
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
OSIABWebViewActivity.ktreplacing the deprecatedonBackPressedoverride withonBackPressedDispatcherandOnBackPressedCallback, following the recommendation from the Android 16 Behaviour Changes documentation page.OSIABWebViewActivity.ktfor Android 13+.targetSdkandcompileSdkupdated.Context
References: https://outsystemsrd.atlassian.net/browse/RMET-4335
Type of changes
Platforms affected
Tests
MABS 11 build
MABS 10 build
No MABS 12 build yet because the Capacitor plugin wasn't updated yet. There should be no differences though, because all the changes are done here at the library side.
Instructions on how to test:
openInWebViewclient action using our InAppBrowser Sample App and test the back button navigation. Test clicking/gesturing the back button right after opening the WebView, which should close the WebView and return to the sample app screen. Also test navigating inside the WebView to other URLs, and then clicking/gesturing the back button to go back in the URLs.gradle-wrapper.properties.Screenshots / Screen recordings (if appropriate)
Predictive back navigation animation
screen-20250729-150328.1.mp4
Checklist
RNMT-XXXX <title>