UpdatedCustomerInfoDelegate

class UpdatedCustomerInfoDelegate(onCustomerInfoUpdated: (customerInfo: CustomerInfo) -> Unit) : PurchasesDelegate

A convenience implementation of PurchasesDelegate specifically for Android. Only requires the caller to provide an implementation of onCustomerInfoUpdated, just like UpdatedCustomerInfoListener in the official RevenueCat Android SDK.

Constructors

Link copied to clipboard
constructor(onCustomerInfoUpdated: (customerInfo: CustomerInfo) -> Unit)

Functions

Link copied to clipboard
open override fun onCustomerInfoUpdated(customerInfo: CustomerInfo)

Called whenever Purchases receives updated customer info. This may happen periodically throughout the life of the app if new information becomes available.

Link copied to clipboard
open override fun onPurchasePromoProduct(product: StoreProduct, startPurchase: (onError: (error: PurchasesError, userCancelled: Boolean) -> Unit, onSuccess: (storeTransaction: StoreTransaction, customerInfo: CustomerInfo) -> Unit) -> Unit)

App Store only. Called when a user initiates a promotional in-app purchase from the App Store. If your app is able to handle a purchase at the current time, run the deferment block in this method. If the app is not in a state to make a purchase: cache the startPurchase block, then call the startPurchase block when the app is ready to make the promotional purchase.