preloadFlows

fun preloadFlows(placementIds: List<String>, loadTimeout: TimeInterval = DEFAULT_PLACEMENT_TIMEOUT, callback: ErrorCallback)

This method enables you to preload multiple flows into the local cache in a single batch, without returning the content, so that subsequent getFlow calls can be served from cache.

Should not be called before activate

Parameters

placementIds

The identifiers of the desired placements. These are the values you specified when you created the placements in the Adapty Dashboard.

loadTimeout

This value limits the timeout for the requests within the batch. The minimum value is 1 second. If the timeout is reached, the SDK attempts to serve the affected placements from fallback sources.

callback

A result containing the optional AdaptyError. If some of the placements could not be preloaded, the error is an com.adapty.errors.AdaptyPreloadPlacementsError containing the per-placement errors.