configure()
A static function that configures a shared instance of Superwall for use throughout your app.
This is a static method called on the Superwall
class itself, not on the shared instance. The Android SDK requires an Application context for initialization.
Purpose
Configures the shared instance of Superwall with your API key and optional configurations, making it ready for use throughout your Android app.
Signature
Parameters
Name | Type | Description |
---|---|---|
application | Application | Your Android Application instance, required for SDK initialization and lifecycle management. |
apiKey | String | Your Public API Key from the Superwall dashboard settings. |
purchaseController | PurchaseController? | Optional object for handling all subscription-related logic yourself. If null , Superwall handles subscription logic. Defaults to null . |
options | SuperwallOptions? | Optional configuration object for customizing paywall appearance and behavior. See SuperwallOptions for details. Defaults to null . |
completion | (() -> Unit)? | Optional completion handler called when Superwall finishes configuring. Defaults to null . |
Returns / State
Configures the Superwall instance which is accessible via Superwall.instance
.
Usage
With custom options:
How is this guide?