Skip to content

Update example app to use DeferredPurchasesListener#436

Merged
NickSxti merged 1 commit intodevelopfrom
nch/sample-deferred-purchases-listener
Apr 9, 2026
Merged

Update example app to use DeferredPurchasesListener#436
NickSxti merged 1 commit intodevelopfrom
nch/sample-deferred-purchases-listener

Conversation

@NickSxti
Copy link
Copy Markdown
Contributor

@NickSxti NickSxti commented Apr 7, 2026

Summary

  • Replace the deprecated setEntitlementsUpdateListener with the new setDeferredPurchasesListener in the example app's EntitlementsScreen.
  • Update the callback to consume PurchaseResult (reading entitlements from it) instead of a Map<string, Entitlement>.
  • Rename the button label and handler to "Set Deferred Purchases Listener" so it matches the new API surface.

Test plan

  • Build and run the example app on iOS / Android.
  • Tap "Set Deferred Purchases Listener" and confirm the snackbar appears.
  • Trigger a deferred purchase (SCA / Ask to Buy / pending) and verify onDeferredPurchaseCompleted fires and the entitlements list updates.

Generated with Claude Code

Replace the deprecated EntitlementsUpdateListener with the new
DeferredPurchasesListener in the EntitlementsScreen of the sample app.
The new listener receives a PurchaseResult and we read entitlements
from it to update the local state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@NickSxti NickSxti merged commit 10b5a17 into develop Apr 9, 2026
1 check passed
@NickSxti NickSxti deleted the nch/sample-deferred-purchases-listener branch April 9, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants