preloadPlan

fun preloadPlan(planLink: ExpoFpLinkType, additionalParams: List<ExpoFpPlanParameter> = emptyList(), locationProvider: IExpoFpLocationProvider? = ExpoFpPlan.globalLocationProvider, messageListener: IExpoFpPlanMessageListener? = null, isDebugModeEnabled: Boolean = false): ExpoFpPreloadedPlanInfo

Preload a plan and store it for later use.

Note: IExpoFpPlanMessageListener is not retained by the SDK; keep your own strong reference for as long as you need callbacks. Because preloading happens before the plan is shown, hold a listener passed here at application or singleton scope, otherwise it may be garbage-collected before the preloaded plan is used.

Return

ExpoFpPreloadedPlanInfo describing the preloaded plan.

Parameters

planLink

Type of the link to load a plan.

additionalParams

Parameters to set up a plan before presenting.

locationProvider

Location provider that will be used. If null, ExpoFpPlan.globalLocationProvider may be used by default.

messageListener

Listener for receiving messages from the plan.