ExpoFpPlan

object ExpoFpPlan

Entry point to ExpoFP functionality.

Use this object to create, preload, or download a plan, and to configure a global location provider.

Initialization

You must call initialize before using downloader, preloader, or createPlanPresenter. This can be done in:

  • Application.onCreate() — recommended for most apps.

  • Activity/Fragment — just before the first usage.

Example in Application:

class App : Application() {
override fun onCreate() {
super.onCreate()
ExpoFpPlan.initialize(this)
}
}

Example just-in-time in Activity:

ExpoFpPlan.initialize(applicationContext)
val presenter = ExpoFpPlan.createPlanPresenter(
planLink = ExpoFpLinkType.ExpoKey("YourExpoKey")
)

Properties

Link copied to clipboard

Loader for downloading and saving plans in the cache directory.

Link copied to clipboard

Singleton wrapper around a location provider.

Link copied to clipboard

Enables sending debug messages from IExpoFpPlanMessageListener.

Link copied to clipboard

Loader for preloading plans.

Functions

Link copied to clipboard
fun createPlanPresenter(planLink: ExpoFpLinkType, additionalParams: List<URLQueryItem> = emptyList(), locationProvider: IExpoFpLocationProvider? = globalLocationProvider, messageListener: IExpoFpPlanMessageListener? = null): IExpoFpPlanPresenter

Create a plan presenter.

Link copied to clipboard
fun initialize(context: Context)

Initialize the SDK with any Context.