AdaptyFlowDefaultEventListener

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun onActionPerformed(action: AdaptyUI.Action, context: Context)

This callback is invoked when user interacts with some widgets on the flow.

Link copied to clipboard
open override fun onAnalyticEvent(name: String, params: Map<String, Any?>, context: Context)

This callback is invoked when the flow reports a custom analytics event intended for your own analytics. Events intended only for Adapty analytics are not delivered here.

Link copied to clipboard

This callback is invoked when user initiates the purchase process, providing the ability to supply an AdaptyPurchaseParameters object with additional purchase options.

Link copied to clipboard
open override fun onBackPressed(context: Context): Boolean

This callback is invoked when the user presses the system back button (or performs the back gesture) while the flow is shown, and no on_device_back action is configured for the current screen or its navigator. A configured on_device_back takes precedence and is handled internally without invoking this callback.

Link copied to clipboard
open override fun onError(error: AdaptyError, context: Context)

This callback is invoked in case of errors that are not tied to a specific purchase or restore flow, e.g. errors during the screen rendering process.

Link copied to clipboard
open override fun onFinishWebPaymentNavigation(product: AdaptyPaywallProduct?, error: AdaptyError?, context: Context)

This callback is invoked after attempting to navigate to the web payment url for a purchase.

Link copied to clipboard
open override fun onFlowClosed()

This callback is invoked when the flow view was dismissed.

Link copied to clipboard
open override fun onFlowShown(context: Context)

This callback is invoked when the flow view was presented.

Link copied to clipboard
open override fun onLoadingProductsFailure(error: AdaptyError, context: Context): Boolean

This callback is invoked in case of errors during the products loading process.

Link copied to clipboard
open override fun onProductSelected(product: AdaptyPaywallProduct, context: Context)

This callback is invoked when a product was selected for purchase (by user or by system).

Link copied to clipboard
open override fun onPurchaseFailure(error: AdaptyError, product: AdaptyPaywallProduct, context: Context)

This callback is invoked when the purchase process fails.

Link copied to clipboard
open override fun onPurchaseFinished(purchaseResult: AdaptyPurchaseResult, product: AdaptyPaywallProduct, context: Context)

This callback is invoked to inform on a canceled, successful, and pending purchase.

Link copied to clipboard
open override fun onPurchaseStarted(product: AdaptyPaywallProduct, context: Context)

This callback is invoked when user initiates the purchase process.

Link copied to clipboard
open override fun onRestoreFailure(error: AdaptyError, context: Context)

This callback is invoked when the restore process fails.

Link copied to clipboard
open override fun onRestoreStarted(context: Context)

This callback is invoked when user initiates the restore process.

Link copied to clipboard
open override fun onRestoreSuccess(profile: AdaptyProfile, context: Context)

This callback is invoked when a successful restore is made.

Link copied to clipboard
open override fun onShowAppRate(context: Context)

This callback is invoked when the flow requests an app-rating prompt.

Link copied to clipboard
open override fun onShowRequestPermission(permission: String?, customArgs: Map<String, String>?, callback: AdaptyFlowEventListener.PermissionCallback, context: Context)

This callback is invoked when the flow requests a runtime permission.