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)

Launch the paywall activity.

fun launch(offeringIdentifier: String, fontProvider: ParcelizableFontProvider? = null, shouldDisplayDismissButton: Boolean = DEFAULT_DISPLAY_DISMISS_BUTTON)

Do not use this method, use the method with the same name that takes an Offering instead. This method is used internally by the hybrid SDKs.

Link copied to clipboard
fun launchIfNeeded(offering: Offering? = null, fontProvider: ParcelizableFontProvider? = null, shouldDisplayDismissButton: Boolean = DEFAULT_DISPLAY_DISMISS_BUTTON, 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, paywallDisplayCallback: PaywallDisplayCallback? = null)

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

fun launchIfNeeded(requiredEntitlementIdentifier: String, offeringIdentifier: String, fontProvider: ParcelizableFontProvider? = null, shouldDisplayDismissButton: Boolean = DEFAULT_DISPLAY_DISMISS_BUTTON, paywallDisplayCallback: PaywallDisplayCallback? = null)

Do not use this method, use the method with the same name that takes an Offering instead. This method is used internally by the hybrid SDKs.