acquirePublication

abstract suspend fun acquirePublication(lcpl: ByteArray, onProgress: (Double) -> Unit = {}): Try<LcpService.AcquiredPublication, LcpError>

Acquires a protected publication from a standalone LCPL's bytes.

License will be injected into the publication archive without explicitly calling injectLicenseDocument. You can cancel the on-going acquisition by cancelling its parent coroutine context.

Parameters

onProgress

Callback to follow the acquisition progress from 0.0 to 1.0.


abstract suspend fun acquirePublication(lcpl: File, onProgress: (Double) -> Unit = {}): Try<LcpService.AcquiredPublication, LcpError>

Acquires a protected publication from a standalone LCPL file.

License will be injected into the publication archive without explicitly calling injectLicenseDocument. You can cancel the on-going acquisition by cancelling its parent coroutine context.

Parameters

onProgress

Callback to follow the acquisition progress from 0.0 to 1.0.