EditionPresenter

Interface for downloading and presenting editions to the user.

Functions

Link copied to clipboard
abstract fun downloadEdition(edition: Edition, downloadProgressListener: DownloadProgressListener): Cancelable?

Use this method to download an edition and make it available for presentation.

Link copied to clipboard
abstract fun getOpenEditionIntent(edition: Edition, onIntentReady: (Intent?, OpenError?) -> Unit)

Use this method to get an Intent to present an edition for reading to the user.

abstract fun getOpenEditionIntent(edition: Edition, page: Int, onIntentReady: (Intent?, OpenError?) -> Unit)

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

Link copied to clipboard
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.

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.