CustomCallbackRegistry

Registry for custom callback handlers associated with paywall presentations.

Handlers are stored by paywall identifier and should be cleaned up when the paywall is dismissed to prevent memory leaks.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun clear()

Clears all registered handlers.

Link copied to clipboard
fun getHandler(paywallIdentifier: String): suspend (CustomCallback) -> CustomCallbackResult?

Gets the custom callback handler for a paywall, if registered.

Link copied to clipboard
fun register(paywallIdentifier: String, handler: suspend (CustomCallback) -> CustomCallbackResult)

Registers a custom callback handler for a paywall.

Link copied to clipboard
fun unregister(paywallIdentifier: String)

Unregisters the custom callback handler for a paywall. Should be called when the paywall is dismissed.