onActionPerformed

abstract fun onActionPerformed(action: AdaptyUI.Action, context: Context)

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

If the user presses the "Terms" or "Privacy Policy" buttons, action OpenUrl will be invoked. The default implementation shows a chooser with apps that can open the link.

If the user presses the close button, action Close will be invoked. The default implementation is simply imitating pressing the system back button.

Note: this callback is not invoked when user presses the system back button instead of the close icon on the screen.

If a button has a custom action, action Custom will be invoked.

Parameters

action

An Action object representing the action.

context

A UI Context within which the event occurred.