Adapty

object Adapty

Properties

Link copied to clipboard

Returns whether activate has been called.

Link copied to clipboard

Set to the most appropriate level of logging.

Functions

Link copied to clipboard
fun activate(context: Context, config: AdaptyConfig)

Use this method to initialize the Adapty SDK.

Link copied to clipboard
fun getFlow(placementId: String, fetchPolicy: AdaptyPlacementFetchPolicy = AdaptyPlacementFetchPolicy.Default, loadTimeout: TimeInterval = DEFAULT_PLACEMENT_TIMEOUT, callback: ResultCallback<AdaptyFlow>)

Adapty allows you remotely configure a Flow that will be displayed in your app.

Link copied to clipboard
fun getFlowForDefaultAudience(placementId: String, fetchPolicy: AdaptyPlacementFetchPolicy = AdaptyPlacementFetchPolicy.Default, callback: ResultCallback<AdaptyFlow>)

This method enables you to retrieve the flow from the Default Audience without having to wait for the Adapty SDK to send all the user information required for segmentation to the server.

Link copied to clipboard
fun getOnboarding(placementId: String, locale: String? = null, fetchPolicy: AdaptyPlacementFetchPolicy = AdaptyPlacementFetchPolicy.Default, loadTimeout: TimeInterval = DEFAULT_PLACEMENT_TIMEOUT, callback: ResultCallback<AdaptyOnboarding>)
Link copied to clipboard
fun getOnboardingForDefaultAudience(placementId: String, locale: String? = null, fetchPolicy: AdaptyPlacementFetchPolicy = AdaptyPlacementFetchPolicy.Default, callback: ResultCallback<AdaptyOnboarding>)
Link copied to clipboard

Once you have an AdaptyFlow, fetch corresponding products list using this method.

Once you have an AdaptyFlowPaywall, fetch corresponding products list using this method.

Link copied to clipboard

The main function for getting a user profile. Allows you to define the level of access, as well as other parameters.

Link copied to clipboard
fun identify(customerUserId: String, gpObfuscatedAccountId: String? = null, callback: ErrorCallback)

Use this method for identifying user with it’s user id in your system.

Link copied to clipboard

You can logout the user anytime by calling this method.

Link copied to clipboard

Whenever you show a flow to your user, call .logShowFlow(flow) to log the event, and it will be accumulated in the flow metrics.

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

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

Link copied to clipboard
fun openWebPaywall(activity: Activity, paywall: AdaptyFlowPaywall, presentation: AdaptyWebPresentation = AdaptyWebPresentation.ExternalBrowser, callback: ErrorCallback)
fun openWebPaywall(activity: Activity, product: AdaptyPaywallProduct, presentation: AdaptyWebPresentation = AdaptyWebPresentation.ExternalBrowser, callback: ErrorCallback)
Link copied to clipboard
fun reportTransaction(transactionInfo: TransactionInfo, variationId: String? = null, callback: ResultCallback<AdaptyProfile>)

In Observer mode, Adapty SDK doesn’t know, where the purchase was made from. If you display products using our Paywalls or A/B Tests, you can manually assign variation to the purchase. After doing this, you’ll be able to see metrics in Adapty Dashboard.

Link copied to clipboard

To restore purchases, you have to call this method.

Link copied to clipboard
fun setFallback(location: FileLocation, callback: ErrorCallback? = null)

To set fallback paywalls, use this method. You should pass exactly the same payload you’re getting from Adapty backend. You can copy it from Adapty Dashboard.

Link copied to clipboard

Sets a single integration identifier associated with the current profile.

Sets the integration identifiers associated with the current profile.

Link copied to clipboard

Override the default logger behavior using this method.

Link copied to clipboard

Implement this method to receive automatic profile updates.

Link copied to clipboard
fun updateAttribution(attributionJson: String, source: AdaptyAttributionSource, callback: ErrorCallback)

To set attribution data for the profile, use this method.

Link copied to clipboard

You can set optional attributes such as email, phone number, etc, to the user of your app. You can then use attributes to create user segments or just view them in CRM.