Skip to content

Update sample app to use QDeferredPurchasesListener#795

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

Update sample app to use QDeferredPurchasesListener#795
NickSxti merged 1 commit into
developfrom
nch/sample-deferred-purchases-listener

Conversation

@NickSxti
Copy link
Copy Markdown
Contributor

@NickSxti NickSxti commented Apr 7, 2026

Summary

  • Replace the deprecated QEntitlementsUpdateListener in EntitlementsFragment with the new QDeferredPurchasesListener introduced in SDK 9.3.0.
  • Display entitlements from the QPurchaseResult and pick a toast message based on the result status (success, pending, canceled, error).
  • Rename related strings (set_entitlements_listener, entitlements_listener_set, entitlements_updated_via_listener) to match the new listener.

Test plan

  • Build the sample app and open the Entitlements screen.
  • Tap "Set Deferred Purchases Listener" and confirm the toast appears and the button switches to the "Listener Set" state.
  • Trigger a deferred purchase (e.g., a pending Google Play transaction) and verify the entitlements list updates and the corresponding status toast is shown.

Generated with Claude Code

Replaces the deprecated QEntitlementsUpdateListener in the sample's
EntitlementsFragment with QDeferredPurchasesListener, which exposes
the full QPurchaseResult (entitlements, status, error). Toast messages
now branch on the purchase result status, and the related strings were
renamed to reflect the new listener.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@NickSxti NickSxti merged commit ce306e0 into develop Apr 9, 2026
1 check passed
@NickSxti NickSxti deleted the nch/sample-deferred-purchases-listener branch April 9, 2026 09:37
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