2.1.0
Take a look at the migration guide
Added
Shared
- (alpha) A new Publication
SearchServiceto search through the resources' content, with a default implementationStringSearchService. ContentProtection.Schemecan be used to identify protection technologies using unique URI identifiers.Linkobjects from archive-based publication assets (e.g. an EPUB/ZIP) have additional properties for entry metadata."properties" { "archive": { "entryLength": 8273, "isEntryCompressed": true } }
Streamer
- EPUB publications implement a
SearchServiceto search through the content. - Known DRM schemes (LCP and Adobe ADEPT) are now sniffed by the
Streamer, when no registeredContentProtectionsupports them.- This is helpful to present an error message when the user attempts to open a protected publication not supported by the app.
Navigator
- The EPUB navigator is now able to navigate to a
Locatorusing itstextcontext. This is useful for search results or highlights missing precise locations. - Get or clear the current user selection of the navigators implementing
SelectableNavigator. - (alpha) Support for the Decorator API to draw user interface elements over a publication's content.
- This can be used to render highlights over a text selection, for example.
- For now, only the EPUB navigator implements
DecorableNavigator, for reflowable publications. You can implement custom decoration styles withHtmlDecorationTemplate.
- Customize the EPUB selection context menu by providing a custom
ActionMode.Callbackimplementation withEpubNavigatorFragment.Configuration.selectionActionModeCallback.- This is an alternative to overriding
Activity.onActionModeStarted()which does not seem to work anymore with Android 12.
- This is an alternative to overriding
- (alpha) A new audiobook navigator based on Android's
MediaSession.- It supports out-of-the-box media style notifications and background playback.
- ExoPlayer is used by default for the actual playback, but you can use a custom player by implementing
MediaPlayer.
OPDS
- New APIs using coroutines and R2's
HttpClientinstead of Fuel and kovenant (contributed by @stevenzeck).
Changed
- Upgraded to Kotlin 1.5.31 and Gradle 7.1.1
Streamer
- The default EPUB positions service now uses the archive entry length when available. This is similar to how Adobe RMSDK generates page numbers.
- To use the former strategy, create the
Streamerwith:Streamer(parsers = listOf(EpubParser(reflowablePositionsStrategy = OriginalLength(pageLength = 1024))))
- To use the former strategy, create the
Navigator
- The order of precedence of
Locatorlocations in the reflowable EPUB navigator is:text, HTML ID, thenprogression. The navigator will now fallback on less precise locations in case of failure.
LCP
- Migrated to Jetpack Room for the SQLite database storing rights and passphrases (contributed by @stevenzeck).
- Note that the internal SQL schema changed. You will need to update your app if you were querying the database manually.
Fixed
Shared
- Crash with
HttpRequest.setPostForm()on Android 6. - HREF normalization when a resource path contains special characters.
Streamer
- EPUB style injection when a resource has a
<head>tag with attributes.
Navigator
- When restoring a
Locator, The PDF navigator now falls back onlocations.positionif thepage=fragment identifier is missing.
OPDS
- Links in an OPDS 2 feed are normalized to the feed base URL.