Package com.adapty.ui.listeners
Interface AdaptyUiObserverModeHandler
-
- All Implemented Interfaces:
public interface AdaptyUiObserverModeHandlerIf you use Adapty in Observer mode, implement this interface to handle purchases on your own.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceAdaptyUiObserverModeHandler.PurchaseStartCallbackpublic interfaceAdaptyUiObserverModeHandler.PurchaseFinishCallback
-
Method Summary
Modifier and Type Method Description abstract UnitonPurchaseInitiated(AdaptyPaywallProduct product, AdaptyPaywall paywall, Context context, AdaptyUiObserverModeHandler.PurchaseStartCallback onStartPurchase, AdaptyUiObserverModeHandler.PurchaseFinishCallback onFinishPurchase)This callback is invoked when the user initiates a purchase. -
-
Method Detail
-
onPurchaseInitiated
abstract Unit onPurchaseInitiated(AdaptyPaywallProduct product, AdaptyPaywall paywall, Context context, AdaptyUiObserverModeHandler.PurchaseStartCallback onStartPurchase, AdaptyUiObserverModeHandler.PurchaseFinishCallback onFinishPurchase)
This callback is invoked when the user initiates a purchase. You can trigger your custom purchase flow in response to this callback, read more.
- Parameters:
product- An AdaptyPaywallProduct of the purchase.paywall- An AdaptyPaywall within which the purchase is initiated.context- A UI Context within which the the purchase is initiated.onStartPurchase- A PurchaseStartCallback that should be invoked to notify AdaptyUI that the purchase is started.onFinishPurchase- A PurchaseFinishCallback that should be invoked to notify AdaptyUI that the purchase is finished successfully or not, or the purchase is canceled.
-
-
-
-