Overview
Encore presents a premium brand offer (a real perk a brand funds to acquire customers, such as a free trial, discount, or credit) at a moment you choose. Start with Reward Users: a reward sheet at a moment the user just earned, such as a completed purchase, a streak, or a milestone, at no cost to you. The other use case, Reduce Churn, presents offers in a cancel flow or after a paywall decline.Present an offer
show() is a suspend function that resolves once the presentation is over, with one complete result record, and it never throws. It is safe to call from any thread or scope:
- Reward Users
- Reduce Churn
UseCase.REWARD_USERS on every reward placement. A reward placement never runs a purchase and never falls back to the paywall layout, so it needs no subscription product and no purchase controller. The walkthrough, including per-call copy, is the Reward Placements guide.result.claim is the claimed offer (or null), result.publisher is your purchase funnel’s outcome, and result.error surfaces presentation failures as values. There is no SDK-computed “unlocked” verdict; your integration branches on the facts your flow cares about. Contracts: placement() · PresentationResult.
Callback form
If the call site isn’t a coroutine, use the callback overload. The callback is delivered exactly once, on the main thread:show(activity) and show(activity) { result -> } overloads are available when you need to bind to a specific Activity.
Handle purchases
This section applies to Reduce Churn placements only. A reward placement never runs a purchase, so an app that presents only reward placements can skip it. If your app has a subscription product configured, register anEncorePurchaseController at configure() time. When a user accepts an offer that leads to a purchase, Encore invokes your controller with the product to buy and awaits your verdict:
PublisherOutcome.NotAttempted, and nothing is ever charged. If your app uses Encore offers without a subscription product, no controller is needed.
Observe outcomes passively
For cross-cutting concerns (analytics, logging, entitlement sync) that shouldn’t live at every call site, collect theEncore.outcomes stream. Subscribe at app startup; there is no replay:
Placement IDs
Use meaningful placement IDs to track where offers are triggered in your app:Bring users back to finish their gift
Put a Claim Reminder on your home tab. It stays hidden until the user claims a gift, then reminds them to finish. Once they do, it thanks them or steps aside. Encore manages that. You can also put a Gifts Button on your reward screen, so users can open their gifts there whenever offers are waiting. Both need version 2.4.0 or later of the SDK. See the trigger components quickstart.Next Steps
- Reward Placements - Reward a user at a moment they just earned, with copy you set per call
- Configure Analytics - Track offer performance and measure impact
- Add Subscription Product - Reduce Churn only: create a Google Play subscription product and connect it to Encore