AdaptyUIOnboardingsEventsObserver

Observes events from AdaptyUI onboardings and handles user interactions or analytics callbacks.

Implement this interface to monitor onboarding lifecycle events such as loading, closing, paywall openings, and analytics tracking. Use it to customize behavior or integrate analytics when users progress through your onboarding flow.

Example:

Adapty.setOnboardingsEventsObserver(object : AdaptyUIOnboardingsEventsObserver {
override fun onboardingViewOnPaywallAction(
view: AdaptyUIOnboardingView,
meta: AdaptyUIOnboardingMeta,
actionId: String
) {
// Open a paywall or handle a custom action
}
})

See also

Properties

Link copied to clipboard
open val mainUiScope: CoroutineScope

Main CoroutineScope used for onboarding UI actions.

Functions

Link copied to clipboard

Called when the onboarding view fails to load due to an AdaptyError.

Link copied to clipboard

Called when the onboarding view finishes loading.

Link copied to clipboard

Called whenever an analytics event occurs during the onboarding flow. Use this to track onboarding progress or user behavior.

Link copied to clipboard

Called when the user performs a close action (e.g., tapping a close button) on the onboarding view. By default, dismisses the view if it is standalone.

Link copied to clipboard

Called when a custom action is triggered from the onboarding. Use the actionId to identify and perform your custom logic.

Link copied to clipboard

Called when a button or element with a paywall action is triggered. By default, opens the paywall using the provided actionId as the placement ID.

Link copied to clipboard

Called when an element's state is updated (e.g., user interaction with input fields or toggles).