[Android] Add advanced present builder callbacks and migrate sample flow#112
Open
tiagocandido wants to merge 1 commit into
Conversation
11 tasks
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
7ce2cfb to
5a6241f
Compare
91bd2ce to
26edc28
Compare
5a6241f to
9e15892
Compare
26edc28 to
1ae88e5
Compare
e305aff to
e641ae5
Compare
|
|
||
| internal fun buildEventProcessor(): DefaultCheckoutEventProcessor = | ||
| object : DefaultCheckoutEventProcessor() { | ||
| override fun onCheckoutCompleted(checkoutCompletedEvent: CheckoutCompletedEvent) { |
Contributor
There was a problem hiding this comment.
complete should exist in the protocol instead now right?
Contributor
Author
There was a problem hiding this comment.
Yep, agreed. complete now lives on the protocol path, same as Swift. I removed builder-level onComplete; the builder just handles fail/cancel and host callbacks now.
9e15892 to
08f6c9d
Compare
e641ae5 to
6aa4b97
Compare
6aa4b97 to
166157a
Compare
kieran-osgood-shopify
approved these changes
May 15, 2026
kiftio
approved these changes
May 15, 2026
Merge activity
|
|
|
||
| internal fun buildEventProcessor(): DefaultCheckoutEventProcessor = | ||
| object : DefaultCheckoutEventProcessor() { | ||
| override fun onCheckoutCompleted(checkoutCompletedEvent: CheckoutCompletedEvent) = Unit |
Contributor
There was a problem hiding this comment.
This callback can be dropped here now right?
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.

What changes are you making?
This PR adds a Kotlin-first per-presentation builder for
ShopifyCheckoutKit.present(checkoutUrl, activity) { ... }and migrates the Android sample to that path.CheckoutPresentation, which exposes builder hooks foronComplete,onFail,onCancel,connect,onShowFileChooser,onGeolocationPermissionsShowPrompt,onGeolocationPermissionsHidePrompt, andonPermissionRequest.ShopifyCheckoutKit.present(checkoutUrl, context, configure)overload that builds aDefaultCheckoutEventProcessorinternally, while keeping the existingDefaultCheckoutEventProcessoroverload for Java and reusable-object integrations.CheckoutPresentationTestcoverage for lifecycle callbacks, optional browser/system callbacks, and forwarding a connectedCheckoutCommunicationClient, and regenerateslib/api/lib.apifor the new API surface.samples/MobileBuyIntegrationoffMobileBuyEventProcessor: checkout completion/failure/cancel handling now lives inCartViewModel, browser/system callbacks route throughMainActivity, and typedCheckoutProtocol.Clientnotifications are connected inline from the builder.How to test
From
platforms/android/:From
platforms/android/samples/MobileBuyIntegration/:Manual sanity in the sample app:
CartViewModel.MainActivity.CheckoutProtocol.Clientnotifications still log from the sample flow.Before you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md)Releasing a new Swift version?
ShopifyCheckoutKit.podspecplatforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swiftplatforms/swift/CHANGELOG.mdplatforms/swift/README.md(major version only)Releasing a new Android version?
versionNameinplatforms/android/lib/build.gradleplatforms/android/CHANGELOG.mdplatforms/android/README.mdTip
See the Contributing documentation for the full release process per platform.