//readium-lcp/org.readium.r2.lcp/LcpService/acquirePublication
acquirePublication¶
[androidJvm]\ abstract suspend fun acquirePublication(lcpl: ByteArray, onProgress: (Double) -> Unit = {}): Try<LcpService.AcquiredPublication, LcpException>
Acquires a protected publication from a standalone LCPL's bytes.
You can cancel the on-going acquisition by cancelling its parent coroutine context.
Parameters¶
androidJvm
onProgress | Callback to follow the acquisition progress from 0.0 to 1.0. |
[androidJvm]\ open suspend fun acquirePublication(lcpl: File, onProgress: (Double) -> Unit = {}): Try<LcpService.AcquiredPublication, LcpException>
Acquires a protected publication from a standalone LCPL file.
You can cancel the on-going acquisition by cancelling its parent coroutine context.
Parameters¶
androidJvm
onProgress | Callback to follow the acquisition progress from 0.0 to 1.0. |