AdaptyUI

Singleton for managing Adapty UI components such as paywalls and onboardings.

This interface is responsible for creating, presenting, and dismissing UI views, as well as observing user interactions and lifecycle events for analytics and customization.

Typical usage:

  • Create and display paywall or onboarding views

  • Register observers for UI events

  • Handle dialog interactions

See also

Functions

Link copied to clipboard
open suspend override fun createOnboardingView(onboarding: AdaptyOnboarding, externalUrlsPresentation: AdaptyWebPresentation): AdaptyResult<AdaptyUIOnboardingView>

Creates an onboarding view from the provided AdaptyOnboarding model.

Link copied to clipboard
open suspend override fun createPaywallView(paywall: AdaptyPaywall, loadTimeout: Duration?, preloadProducts: Boolean, customTags: Map<String, String>?, customTimers: Map<String, LocalDateTime>?, customAssets: Map<String, AdaptyCustomAsset>?, productPurchaseParams: Map<AdaptyProductIdentifier, AdaptyPurchaseParameters>?): AdaptyResult<AdaptyUIPaywallView>

Creates a paywall view that can be presented to the user.

Link copied to clipboard

Dismisses the currently displayed onboarding view.

Link copied to clipboard
open suspend override fun dismissPaywallView(view: AdaptyUIPaywallView): AdaptyResult<Unit>

Dismisses the currently displayed paywall view.

Link copied to clipboard
open suspend override fun presentOnboardingView(view: AdaptyUIOnboardingView, iosPresentationStyle: AdaptyUIIOSPresentationStyle): AdaptyResult<Unit>

Presents the provided onboarding view.

Link copied to clipboard
open suspend override fun presentPaywallView(view: AdaptyUIPaywallView, iosPresentationStyle: AdaptyUIIOSPresentationStyle): AdaptyResult<Unit>

Presents the provided paywall view.

Link copied to clipboard

Registers an AdaptyUIOnboardingsEventsObserver for a specific onboarding view.

Link copied to clipboard
Link copied to clipboard

Sets an observer to receive events from AdaptyUI onboardings.

Link copied to clipboard

Sets an observer to receive events from paywalls displayed.

Link copied to clipboard
open suspend override fun showDialog(viewId: String, title: String, content: String, primaryActionTitle: String, secondaryActionTitle: String?): AdaptyResult<AdaptyUIDialogActionType>

Displays a simple dialog within the context of a paywall or onboarding view.

Link copied to clipboard
open override fun unregisterOnboardingEventsListener(viewId: String)

Unregisters the onboarding event observer for the specified view.

Link copied to clipboard
open override fun unregisterPaywallEventsListener(viewId: String)