PaywallActivityLauncher
class PaywallActivityLauncher(resultCaller: ActivityResultCaller, resultHandler: PaywallResultHandler)
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.
Functions
Link copied to clipboard
fun launch(offering: Offering? = null, fontProvider: ParcelizableFontProvider? = null, shouldDisplayDismissButton: Boolean = DEFAULT_DISPLAY_DISMISS_BUTTON, edgeToEdge: Boolean = defaultEdgeToEdge)
Launch the paywall activity.
fun launch(offeringIdentifier: String, presentedOfferingContext: PresentedOfferingContext, fontProvider: ParcelizableFontProvider? = null, shouldDisplayDismissButton: Boolean = DEFAULT_DISPLAY_DISMISS_BUTTON, edgeToEdge: Boolean = defaultEdgeToEdge)
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.
fun launchIfNeeded(requiredEntitlementIdentifier: String, offeringIdentifier: String, presentedOfferingContext: PresentedOfferingContext, fontProvider: ParcelizableFontProvider? = null, shouldDisplayDismissButton: Boolean = DEFAULT_DISPLAY_DISMISS_BUTTON, edgeToEdge: Boolean = defaultEdgeToEdge, paywallDisplayCallback: PaywallDisplayCallback? = null)