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
Functions
Called when the onboarding view fails to load due to an AdaptyError.
Called when the onboarding view finishes loading.
Called whenever an analytics event occurs during the onboarding flow. Use this to track onboarding progress or user behavior.
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.
Called when a custom action is triggered from the onboarding. Use the actionId to identify and perform your custom logic.
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.
Called when an element's state is updated (e.g., user interaction with input fields or toggles).