getFlow

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.

Unlike onboardings, a flow is fetched without a locale: the locale is applied later, when the view configuration is requested via AdaptyUI.getFlowConfiguration(flow, callback).

Should not be called before activate

Parameters

placementId

The identifier of the desired placement. This is the value you specified when you created the placement in the Adapty Dashboard.

fetchPolicy

By default SDK will try to load data from the server and will return cached data in case of failure. Otherwise use AdaptyPlacementFetchPolicy.ReturnCacheDataElseLoad to return cached data if it exists.

loadTimeout

This value limits the timeout for this method. If the timeout is reached, cached data or local fallback will be returned. The minimum value is 1 second. If a timeout is not required, you can pass TimeInterval.INFINITE.

callback

A result containing the AdaptyFlow object.