-
public final class PaywallActivityLauncherLaunches 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.
-
-
Constructor Summary
Constructors Constructor Description PaywallActivityLauncher(ActivityResultCaller resultCaller, PaywallResultHandler resultHandler)
-
Method Summary
Modifier and Type Method Description final Unitlaunch(Offering offering, ParcelizableFontProvider fontProvider, Boolean shouldDisplayDismissButton)Launch the paywall activity. final Unitlaunch(Offering offering, ParcelizableFontProvider fontProvider)Launch the paywall activity. final Unitlaunch(Offering offering)Launch the paywall activity. final Unitlaunch()Launch the paywall activity. final UnitlaunchIfNeeded(String requiredEntitlementIdentifier, Offering offering, ParcelizableFontProvider fontProvider, Boolean shouldDisplayDismissButton, PaywallDisplayCallback paywallDisplayCallback)Launch the paywall activity if the current user does not have requiredEntitlementIdentifier active. final UnitlaunchIfNeeded(String requiredEntitlementIdentifier, Offering offering, ParcelizableFontProvider fontProvider, Boolean shouldDisplayDismissButton)Launch the paywall activity if the current user does not have requiredEntitlementIdentifier active. final UnitlaunchIfNeeded(String requiredEntitlementIdentifier, Offering offering, ParcelizableFontProvider fontProvider)Launch the paywall activity if the current user does not have requiredEntitlementIdentifier active. final UnitlaunchIfNeeded(String requiredEntitlementIdentifier, Offering offering)Launch the paywall activity if the current user does not have requiredEntitlementIdentifier active. final UnitlaunchIfNeeded(String requiredEntitlementIdentifier)Launch the paywall activity if the current user does not have requiredEntitlementIdentifier active. final UnitlaunchIfNeeded(Offering offering, ParcelizableFontProvider fontProvider, Boolean shouldDisplayDismissButton, Function1<CustomerInfo, Boolean> shouldDisplayBlock)Launch the paywall activity based on whether the result of shouldDisplayBlock is true. final UnitlaunchIfNeeded(Offering offering, ParcelizableFontProvider fontProvider, Function1<CustomerInfo, Boolean> shouldDisplayBlock)Launch the paywall activity based on whether the result of shouldDisplayBlock is true. final UnitlaunchIfNeeded(Offering offering, Function1<CustomerInfo, Boolean> shouldDisplayBlock)Launch the paywall activity based on whether the result of shouldDisplayBlock is true. final UnitlaunchIfNeeded(Function1<CustomerInfo, Boolean> shouldDisplayBlock)Launch the paywall activity based on whether the result of shouldDisplayBlock is true. -
-
Constructor Detail
-
PaywallActivityLauncher
PaywallActivityLauncher(ActivityResultCaller resultCaller, PaywallResultHandler resultHandler)
-
-
Method Detail
-
launch
@JvmOverloads() final Unit launch(Offering offering, ParcelizableFontProvider fontProvider, Boolean shouldDisplayDismissButton)
Launch the paywall activity.
- Parameters:
offering- The offering to be shown in the paywall.fontProvider- The ParcelizableFontProvider to be used in the paywall.shouldDisplayDismissButton- Whether to display the dismiss button in the paywall.
-
launch
@JvmOverloads() final Unit launch(Offering offering, ParcelizableFontProvider fontProvider)
Launch the paywall activity.
- Parameters:
offering- The offering to be shown in the paywall.fontProvider- The ParcelizableFontProvider to be used in the paywall.
-
launch
@JvmOverloads() final Unit launch(Offering offering)
Launch the paywall activity.
- Parameters:
offering- The offering to be shown in the paywall.
-
launch
@JvmOverloads() final Unit launch()
Launch the paywall activity.
-
launchIfNeeded
@JvmOverloads() final Unit launchIfNeeded(String requiredEntitlementIdentifier, Offering offering, ParcelizableFontProvider fontProvider, Boolean shouldDisplayDismissButton, PaywallDisplayCallback paywallDisplayCallback)
Launch the paywall activity if the current user does not have requiredEntitlementIdentifier active.
- Parameters:
requiredEntitlementIdentifier- the paywall will be displayed only if the current user does not have this entitlement active.offering- The offering to be shown in the paywall.fontProvider- The ParcelizableFontProvider to be used in the paywall.shouldDisplayDismissButton- Whether to display the dismiss button in the paywall.paywallDisplayCallback- Callback that will be called with true if the paywall was displayed
-
launchIfNeeded
@JvmOverloads() final Unit launchIfNeeded(String requiredEntitlementIdentifier, Offering offering, ParcelizableFontProvider fontProvider, Boolean shouldDisplayDismissButton)
Launch the paywall activity if the current user does not have requiredEntitlementIdentifier active.
- Parameters:
requiredEntitlementIdentifier- the paywall will be displayed only if the current user does not have this entitlement active.offering- The offering to be shown in the paywall.fontProvider- The ParcelizableFontProvider to be used in the paywall.shouldDisplayDismissButton- Whether to display the dismiss button in the paywall.
-
launchIfNeeded
@JvmOverloads() final Unit launchIfNeeded(String requiredEntitlementIdentifier, Offering offering, ParcelizableFontProvider fontProvider)
Launch the paywall activity if the current user does not have requiredEntitlementIdentifier active.
- Parameters:
requiredEntitlementIdentifier- the paywall will be displayed only if the current user does not have this entitlement active.offering- The offering to be shown in the paywall.fontProvider- The ParcelizableFontProvider to be used in the paywall.
-
launchIfNeeded
@JvmOverloads() final Unit launchIfNeeded(String requiredEntitlementIdentifier, Offering offering)
Launch the paywall activity if the current user does not have requiredEntitlementIdentifier active.
- Parameters:
requiredEntitlementIdentifier- the paywall will be displayed only if the current user does not have this entitlement active.offering- The offering to be shown in the paywall.
-
launchIfNeeded
@JvmOverloads() final Unit launchIfNeeded(String requiredEntitlementIdentifier)
Launch the paywall activity if the current user does not have requiredEntitlementIdentifier active.
- Parameters:
requiredEntitlementIdentifier- the paywall will be displayed only if the current user does not have this entitlement active.
-
launchIfNeeded
@JvmOverloads() final Unit launchIfNeeded(Offering offering, ParcelizableFontProvider fontProvider, Boolean shouldDisplayDismissButton, Function1<CustomerInfo, Boolean> shouldDisplayBlock)
Launch the paywall activity based on whether the result of shouldDisplayBlock is true.
- Parameters:
offering- The offering to be shown in the paywall.fontProvider- The ParcelizableFontProvider to be used in the paywall.shouldDisplayDismissButton- Whether to display the dismiss button in the paywall.shouldDisplayBlock- the paywall will be displayed only if this returns true.
-
launchIfNeeded
@JvmOverloads() final Unit launchIfNeeded(Offering offering, ParcelizableFontProvider fontProvider, Function1<CustomerInfo, Boolean> shouldDisplayBlock)
Launch the paywall activity based on whether the result of shouldDisplayBlock is true.
- Parameters:
offering- The offering to be shown in the paywall.fontProvider- The ParcelizableFontProvider to be used in the paywall.shouldDisplayBlock- the paywall will be displayed only if this returns true.
-
launchIfNeeded
@JvmOverloads() final Unit launchIfNeeded(Offering offering, Function1<CustomerInfo, Boolean> shouldDisplayBlock)
Launch the paywall activity based on whether the result of shouldDisplayBlock is true.
- Parameters:
offering- The offering to be shown in the paywall.shouldDisplayBlock- the paywall will be displayed only if this returns true.
-
launchIfNeeded
@JvmOverloads() final Unit launchIfNeeded(Function1<CustomerInfo, Boolean> shouldDisplayBlock)
Launch the paywall activity based on whether the result of shouldDisplayBlock is true.
- Parameters:
shouldDisplayBlock- the paywall will be displayed only if this returns true.
-
-
-
-