Skip to content

Update sample app to use QDeferredPurchasesListener#795

Open
NickSxti wants to merge 1 commit intodevelopfrom
nch/sample-deferred-purchases-listener
Open

Update sample app to use QDeferredPurchasesListener#795
NickSxti wants to merge 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 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>
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