- Expose onGeolocationPermissionsShowPrompt() and onGeolocationPermissionsHidePrompt(), allowing them to be implemented so customers can use the
Use my location
functionality to find nearby pickup points.
- Updates the proguard rules for the library to prevent minification of essential classes.
- Removes redundant code.
- Fix: Ensure we clear the preload cache on error responses.
- Prevent entering recovery mode for single-use multipass URLs.
- Add invalidate() function to interface to allow invalidating preloaded checkouts when necessary.
- Open deep links externally
- Ensure that cached WebView instances don't have existing parents before trying to add them to their container.
- Implement and expose
onShowFileChooser()
, to support clients with checkouts that need to show a native file chooser. Example in the MobileBuyIntegration demo app.
- Update Web Pixel schema data classes.
- Tag instrumentation with
preloading
state.
- Implements
onPermissionRequest()
to call a neweventProcessor.onPermissionRequest(permissionRequest: PermissionRequest)
callback allowing clients to grant or deny permission requests, or request permissions (e.g. camera, record audio). This is sometimes required for checkouts that use features that require verifying identity.
- Call
onPause()
on the WebView as it's created if preloading, andonResume()
when it's presented, so the Page Visibility API reports correct values. - Ensure
WebView.destroy()
is not called on visible views, if preload is called while the view is visible.
ShopifyCheckoutSheet.present()
now returns an interface allowing clients to dismiss the sheet.- Error handling has been improved*. The kit also attempts to load checkout in a recovery WebView when certain errors are encountered. See Error Handling for more information.
*Please note the exception class hierarchy has been updated to be more comprehensive. Each exception class now returns an isRecoverable: Boolean
, an errorCode
and an errorDescription
.
- Update compileSDK to 34
- Upgrade gradle and plugins (android gradle plugin, kotlin serialization, android kotlin)
- Upgrade dependencies (robolectric)
- Breaking Changes The loading spinner has been replaced by a progress bar on the webview. This will result in a faster perceived load time for checkout because the SDK will no longer wait for a full page load to show the DOM content.
If you were previously setting the loading spinner color, the field has been renamed from spinnerColor
to `progressIndicator e.g:
Colors(
- spinnerColor = Color.ResourceId(R.color.a_color),
+ progressIndicator = Color.ResourceId(R.color.a_color),
)
- Breaking Changes The
onCheckoutCompleted
callback now returns a completed event object, containing details about the order:
override fun onCheckoutCompleted(checkoutCompletedEvent: CheckoutCompletedEvent) {
println(checkoutCompletedEvent.orderDetails.id)
}
-
Breaking Changes The
CheckoutEventProcessor
passed topresent()
must now be a subclass ofDefaultCheckoutEventProcessor
. -
The webview cache is no longer cleared on closing the dialog if checkout has not yet completed. This allows quickly reopening the dialog, and matches the behaviour in the swift library. As in swift, if preloading is enabled, it's important to call preload each tim the cart changes to avoid stale checkouts.
-
Upgrade
org.jetbrains.kotlinx:kotlinx-serialization-json
dependency from 1.5.1 to 1.6.3
- Checkout Sheet Kit is now generally available
- Breaking Changes A new
onWebPixelEvent(PixelEvent)
function has been added to theCheckoutEventProcessor
interface. This allows listening for Web Pixel events that take place in checkout, so they can be emitted to your preferred analytics system. SeeREADME.md
for more details.
Note: If your processor extends DefaultCheckoutEventProcessor
, a no-op implementation has been added, so no changes are required unless you'd like to respond to pixel events. If your processor does not extend DefaultCheckoutEventProcessor
, you will need to implement this function.
- Fix: Prevent loading checkout twice during preloads.
- Fix: Match
CheckoutDialog
's header padding with checkout's padding. - Fix: Ensure the WebView cache is cleared on error responses for preloaded requests.
- Breaking Changes: The library has been rebranded from Shopify Checkout Kit to Shopify Checkout Sheet Kit. Apologies for any inconvenience caused. Here are the steps to upgrade:
- Update your gradle/maven import:
- implementation 'com.shopify:checkout-kit:0.3.3'
+ implementation 'com.shopify:checkout-sheet-kit:0.4.0'
- Update the imports throughout your codebase:
- com.shopify.checkoutkit.*
+ com.shopify.checkoutsheetkit.*
- Update the
present|preload|configure()
calls throughout your codebase:
- ShopifyCheckoutKit.present|preload|configure()
+ ShopifyCheckoutSheetKit.present|preload|configure()
Also included:
- Inform checkout when the sheet has been presented to help distinguish between preloads and presents. Groundwork for analytics.
- Emit instrumentation payloads to improve observability.
- Exposes the
errorDescription
internal variable on theCheckoutException
class.
- Adds annotations (
@ColorInt
and@ColorRes
) for more robust color value enforcement. - Exposes the
lightColors
anddarkColors
properties of theAutomatic
ColorScheme class to allow overrides.
- Fix for Java interoperability related to default arguments on
DefaultCheckoutEventProcessor
.
-
Breaking Changes: Allows setting sRGB colors as well as color resource IDs in ColorSchemes.
// Previously webViewBackground = Color(R.color.checkoutDarkBg) // Now webViewBackground = Color.ResourceId(R.color.checkoutDarkBg) // Or webViewBackground = Color.SRGB(-0xff0001)
-
Implemented
onRenderProcessGone
to prevent app crashes when the render process is killed to reclaim memory -
JavaDoc improvements
-
Added function to retrieve the currently applied
ShopifyCheckoutKit
configuration