Advanced
PaywallBuilder
A builder class for creating custom PaywallView instances for advanced presentation.
You're responsible for managing the lifecycle of the returned PaywallView. Do not use the same PaywallView instance in multiple places simultaneously.
The remotely configured presentation style is ignored when using this method. You must handle presentation styling programmatically.
Purpose
Creates a PaywallView that you can present however you want, bypassing Superwall's automatic presentation logic.
Signature
Parameters
Name | Type | Description |
---|---|---|
placement | String | The name of the placement as defined on the Superwall dashboard. |
params | Map<String, Any>? | Optional parameters to pass with your placement for audience filters. Keys beginning with $ are reserved and will be dropped. |
overrides | PaywallOverrides? | Optional overrides for products and presentation style. |
delegate | PaywallViewCallback | A delegate to handle user interactions with the retrieved PaywallView. |
activity | Activity | The activity context required for the PaywallView. |
Returns / State
Returns a Result<PaywallView>
that you can add to your view hierarchy. If presentation should be skipped, returns a failure result.
Usage
Using with coroutines:
Jetpack Compose integration:
How is this guide?