Repository navigation
Allow Android hosts to handle navigation links - #851
Merged
Merged
Conversation
kiftio
force-pushed
the
android-intercept-navigation-deep-links
branch
from
September 29, 2026 08:58
2e5ce3e to
8c33be5
Compare
kiftio
marked this pull request as ready for review
September 29, 2026 10:14
Package Size
Android file breakdown
Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report. |
Install this buildOpen Tophat, select your target device, then click Install. Links open on the Mac running Tophat.
Checkout Kit E2E results
|
| // Returning Open keeps Checkout Kit's Custom Tab and non-web intent handling. | ||
| if (handler == WindowOpenHandler.Default) return CheckoutLinkAction.Open | ||
| if (handler == WindowOpenHandler.Default) { | ||
| recordSdkEvent("Checkout link delegated to Checkout Kit", mapOf("url" to link.url.toString())) |
Contributor
There was a problem hiding this comment.
we print the url above so probably dont need to print it here too
kieran-osgood-shopify
approved these changes
Sep 29, 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.
Summary
Raw WebView navigations to
mailto:,tel:, and custom-scheme URLs were launched by Checkout Kit directly. That bypassed the publiconLinkClick/onCheckoutLinkClickeddecision point, even though protocolec.window.open_requestlinks already use it.Route these navigation links through the existing listener before applying the default external
ACTION_VIEWbehavior:Openpreserves the current Checkout Kit launcher behavior.Handledleaves launching/routing to the host app.Cancelblocks the navigation.This makes the public link-action contract apply consistently to both protocol window-open requests and intercepted WebView navigation links. Direct intent launching is retained for the default path, so custom-scheme links do not require host
<queries>declarations merely for Checkout Kit to open them.Tests
HandledandCanceldo not launch an external intent.platforms/android/gradlew -p platforms/android \ :lib:testDebugUnitTest \ --tests 'com.shopify.checkoutkit.CheckoutWebViewClientTest' \ --console=plainDiagnostics
Adds debug logging that distinguishes an intercepted raw navigation link from the host or SDK default-handling outcome.