Overview
As soon as your app launches, you need to configure the SDK with your API Key. Retrieve your publishable Live key yourself from the Dashboard under Settings → Project API Keys (use the Test key for staging and local development).Initialize Encore in your app
Callconfigure() in your Application.onCreate() so the SDK is ready before any Activity starts.
Encore, the primary class for interacting with the SDK’s API. Make sure to replace pk_your_api_key_here with your public API key.
Can’t find your API key? Open your project’s Settings → Project API Keys in the Encore Dashboard and copy the Live key (or Test for non-production builds).
Register a purchase controller
If your app sells a subscription product through Encore offers, register anEncorePurchaseController at configure time. The SDK has no built-in billing: when a user accepts an offer that requires a purchase, the SDK calls your controller, which performs the purchase through your billing code and reports back.
Add the controller to the call you already have. configure() runs once per process: a second call logs a warning and is ignored, so a controller passed to it never registers.
Next Steps
Now that Encore is configured, you’re ready to:- User Management - Identify users for entitlement tracking
- Present Offers - Show promotional offers and read the result