rememberDataPackageExporter

fun rememberDataPackageExporter(dataPackageProvider: suspend () -> ByteArray?, onResult: suspend (exported: Boolean) -> Unit = {}): (fileName: String) -> Unit(source)

Returns a launcher for exporting a TAK data package zip.

Return

a lambda accepting the suggested file name to trigger the export

Parameters

dataPackageProvider

suspend function producing the zip ByteArray; null means there is nothing valid to export (for example the install's certificates could not be loaded) and onResult receives false.

onResult

called with whether the package was written