Creates a set of specific view event listeners
Optional
eventHandlers: Partial<EventHandlers> = DEFAULT_EVENT_HANDLERSset of event handling callbacks
unsubscribe - function to unsubscribe all listeners
Creates a set of specific view event listeners
unsubscribe - function to unsubscribe all listeners
It registers only requested set of event handlers. Your config is assigned into five event listeners DEFAULT_EVENT_HANDLERS, that handle default behavior.
onCloseButtonPress
- closes paywall (returns true
)onAndroidSystemBack
- closes paywall (returns true
)onRestoreCompleted
- closes paywall (returns true
)onPurchaseCompleted
- closes paywall on success (returns purchaseResult.type !== 'user_cancelled'
)onUrlPress
- opens URL and keeps paywall open (returns false
)If you want to override these listeners, we strongly recommend to return the same value as the default implementation from your custom listener to retain default behavior.
It registers only requested set of event handlers. Your config is assigned into five event listeners DEFAULT_EVENT_HANDLERS, that handle default behavior.
onCloseButtonPress
- closes paywall (returns true
)onAndroidSystemBack
- closes paywall (returns true
)onRestoreCompleted
- closes paywall (returns true
)onPurchaseCompleted
- closes paywall on success (returns purchaseResult.type !== 'user_cancelled'
)onUrlPress
- opens URL and keeps paywall open (returns false
)If you want to override these listeners, we strongly recommend to return the same value as the default implementation from your custom listener to retain default behavior.
Presents the dialog
A config for showing the dialog.
A Promise that resolves to the AdaptyUiDialogActionType object
If you provide two actions in the config, be sure primaryAction
cancels the operation
and leaves things unchanged.
Generated using TypeDoc
Provides methods to control created paywall view