downloader
Loader for downloading and saving plans in the cache directory.
Important: You are responsible for deleting plans using ExpoFpPlanDownloader.removeDownloadedPlan or ExpoFpPlanDownloader.removeAllDownloadedPlans.
Download a plan from the internet
val result = ExpoFpPlan.downloader.downloadPlanWithExpoKey("YourExpoKey")
val info = result.getOrNull() ?: error("Download failed: ${'$'}{result.errorOrNull()}")
Content copied to clipboard
Unzip from an app-bundled archive
Important: The archive must be named <expokey>_<version>.zip
to identify the plan.
val zipPath = File(filesDir, "<expokey>_<version>.zip").absolutePath
val result = ExpoFpPlan.downloader.downloadPlanWithZipFilePath(zipPath)
val info = result.getOrNull() ?: error("Unzip failed: ${'$'}{result.errorOrNull()}")
Content copied to clipboard