Skip to main content
Configures the shared Encore instance for use throughout your app. This must be called once, typically in your Application.onCreate(), before using any other SDK methods.
Call configure() before using any other SDK methods. Failure to do so will result in EncoreError.Integration.NotConfigured errors.

Signature

Parameters

Log levels

Higher levels include all lower levels. For example, INFO will also show warnings and errors.

API keys

Encore supports two types of API keys:
Use the test key (pk_test_...) during development to test offers from any location without geo-filtering restrictions. This makes it easy to test the entire entitlement lifecycle end-to-end for a single user.
Always use your live key (pk_live_...) in production builds. The test key is for development and testing only.

Usage

Basic Configuration

With Debug Logging (Development)

Using Test Key for Development

Use the test key to test offers from any location without geo-filtering:
The test key (pk_test_...) is perfect for comprehensive end-to-end testing of the entitlement lifecycle, allowing you to test location-restricted offers from anywhere during development.
Use LogLevel.DEBUG during development to see detailed SDK logs, then use LogLevel.NONE for production builds.