openEdition

abstract fun openEdition(edition: Edition, context: Context, onFinishedOpening: (OpenError?) -> Unit)

Use this method to present an edition for reading to the user. It will open a new activity.

The method is async, and onFinishedOpening will be called once the edition is going to be actually presented. The edition must be previously downloaded (see downloadEdition or this method will fail with OpenError.EDITION_NOT_DOWNLOADED. If the Edition is stale for some reason and it is not found then the method will fail with OpenError.EDITION_NOT_FOUND.

context is the presenting context from where the reading activity will be presented.

The issue will be opened to the cover page if it is the first time it has been opened or to the last page seen by the user if it is being reopened.


abstract fun openEdition(edition: Edition, context: Context, page: Int, onFinishedOpening: (OpenError?) -> Unit)

Same as the method above but you can specify the page the edition will be opened at. 1 represents the cover page.