export
Declaration
suspend fun export( scanDirPath: String, scanId: String, userData: Map<String, Any>? = null, exportAsVideo: Boolean = true, exportResolution: ExportResolution = ExportResolution.HIGH, timeoutMillis: Long = TIMEOUT_MS, onProgress: ((Float) -> Unit)? = null ): AsyncResult<String, Nothing>
Summary
Returns
An AsyncResult which will be either AsyncResult.Success containing the path to the exported file, or AsyncResult.Timeout.
Throws
java.lang.NullPointerException— if any of the map's keys are null.ArdkNullArgumentStatusException— if thescanIdis empty.ArdkInvalidArgumentStatusException— if no export withscanIdcould be found.ArdkInvalidOperationStatusException— if the export is not complete, or there was no data exported.
Parameters
| Name | Type | Summary |
|---|---|---|
| scanDirPath | String | The base directory path where the export will be saved |
| scanId | String | The unique identifier of the scan to export |
| userData | Map<String, Any>? | - |
| exportAsVideo | Boolean | If true, the RGB frames in the scan will be exported as an .mp4 video. If false, they will be individual image files. |
| exportResolution | ExportResolution | Resolution option for exported images (default: [ExportResolution.HIGH]). |
| timeoutMillis | Long | How long to wait for the export, 10 seconds by default ([TIMEOUT_MS]). When it passes, the export is aborted and [AsyncResult.Timeout] is returned. Large scans can take longer than the default: pass a larger value for them. Cancelling the calling coroutine also aborts the export. |
| onProgress | ((Float) -> Unit)? | Called on the calling coroutine with export progress in [0, 1]. |
Asynchronously exports a scan recording.
This function suspends execution until the export operation is complete,
has failed, or has timed out.