PaywallActivityLauncher

Launches the paywall activity. You need to create this object during the activity's onCreate. Then launch the activity at your moment of choice. This can be instantiated with an ActivityResultCaller instance like a ComponentActivity or a Fragment.

Constructors

Link copied to clipboard
constructor(resultCaller: ActivityResultCaller, resultHandler: PaywallResultHandler)

Functions

Link copied to clipboard
fun launch(offering: Offering? = null, fontProvider: ParcelizableFontProvider? = null, shouldDisplayDismissButton: Boolean = DEFAULT_DISPLAY_DISMISS_BUTTON, edgeToEdge: Boolean = defaultEdgeToEdge, customVariables: Map<String, CustomVariableValue> = emptyMap())

Launch the paywall activity.

Link copied to clipboard
fun launchIfNeeded(offering: Offering? = null, fontProvider: ParcelizableFontProvider? = null, shouldDisplayDismissButton: Boolean = DEFAULT_DISPLAY_DISMISS_BUTTON, edgeToEdge: Boolean = defaultEdgeToEdge, shouldDisplayBlock: (CustomerInfo) -> Boolean)

Launch the paywall activity based on whether the result of shouldDisplayBlock is true.

fun launchIfNeeded(requiredEntitlementIdentifier: String, offering: Offering? = null, fontProvider: ParcelizableFontProvider? = null, shouldDisplayDismissButton: Boolean = DEFAULT_DISPLAY_DISMISS_BUTTON, edgeToEdge: Boolean = defaultEdgeToEdge, paywallDisplayCallback: PaywallDisplayCallback? = null)

Launch the paywall activity if the current user does not have requiredEntitlementIdentifier active.

Link copied to clipboard

Launch the paywall activity conditionally with the specified options.

Link copied to clipboard

Launch the paywall activity with the specified options.