Readium Mobile is a toolkit for ebooks, audiobooks and comics written in Swift & Kotlin.
This toolkit is a modular project, which follows the Readium Architecture. The different modules are found under readium/.
shared– SharedPublicationmodels and utilitiesstreamer– Publication parsers and local HTTP servernavigator– PlainFragmentandActivityclasses rendering publicationsopds– Parsers for OPDS catalog feedslcp– Service and models for Readium LCPadapters– Adapters to use third-party libraries with Readium.adapters/pdfium– Parse and render PDFs using the open source library PdfiumAndroid.adapters/pspdfkit– Parse and render PDFs using the commercial library PSPDFKit.
A Test App demonstrates how to integrate the Readium Kotlin toolkit in your own reading app.
❓ Find documentation and API reference at readium.org/kotlin-toolkit.
| Readium | Android min SDK | Android compile SDK | Kotlin compiler (✻) | Gradle (✻) |
|---|---|---|---|---|
| 3.0.0 | 21 | 34 | 1.9.22 | 8.2.2 |
| 2.3.0 | 21 | 33 | 1.7.10 | 6.9.3 |
✻ Only required if you integrate Readium as a submodule instead of using Maven Central.
Readium modules are distributed with Maven Central. Make sure that you have the $readium_version property set in your root build.gradle, then add the Maven Central and JCenter repositories.
buildscript {
ext.readium_version = '3.0.0-alpha.1'
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}Then, add the dependencies to the Readium modules you need in your app's build.gradle.
dependencies {
implementation "org.readium.kotlin-toolkit:readium-shared:$readium_version"
implementation "org.readium.kotlin-toolkit:readium-streamer:$readium_version"
implementation "org.readium.kotlin-toolkit:readium-navigator:$readium_version"
implementation "org.readium.kotlin-toolkit:readium-opds:$readium_version"
implementation "org.readium.kotlin-toolkit:readium-lcp:$readium_version"
}You may prefer to use a local Git clone if you want to contribute to Readium, or if you are using your own fork.
First, add the repository as a Git submodule of your app repository, then checkout the desired branch or tag:
git submodule add https://github.com/readium/kotlin-toolkit.gitMake sure you have Jetifier enabled in your gradle.properties file:
android.enableJetifier=trueThen, include the Readium build to your project's settings.gradle file. The Readium dependencies will automatically build against the local sources.
// Provide the path to the Git submodule.
includeBuild 'kotlin-toolkit'Using the toolkit with Readium LCP requires additional dependencies, including the binary liblcp provided by EDRLab. Contact EDRLab to request your private liblcp and the setup instructions.