makePurchase

fun makePurchase(activity: Activity, product: AdaptyPaywallProduct, params: AdaptyPurchaseParameters = AdaptyPurchaseParameters.Empty, callback: ResultCallback<AdaptyPurchaseResult>)

To make the purchase, you have to call this method.

Should not be called before activate

Parameters

activity

An Activity instance.

product

An AdaptyPaywallProduct object retrieved from the paywall.

params

Optional AdaptyPurchaseParameters used to provide additional purchase options.

callback

The result includes an AdaptyPurchaseResult object, which provides details about the purchase. If the result is AdaptyPurchaseResult.Success, it also includes the user's profile. The profile, in turn, includes details about access levels, subscriptions, and non-subscription purchases. Generally, you have to check only access level status to determine whether the user has premium access to the app.

See also