Skip to content

2.1.0

Choose a tag to compare

@mickael-menu mickael-menu released this 24 Sep 17:11
· 322 commits to develop since this release
b33a5dd

Take a look at the migration guide

Added

Shared

  • (alpha) A new Publication SearchService to search through the resources' content, with a default implementation StringSearchService.
  • ContentProtection.Scheme can be used to identify protection technologies using unique URI identifiers.
  • Link objects 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 SearchService to search through the content.
  • Known DRM schemes (LCP and Adobe ADEPT) are now sniffed by the Streamer, when no registered ContentProtection supports 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 Locator using its text context. 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 with HtmlDecorationTemplate.
  • Customize the EPUB selection context menu by providing a custom ActionMode.Callback implementation with EpubNavigatorFragment.Configuration.selectionActionModeCallback.
    • This is an alternative to overriding Activity.onActionModeStarted() which does not seem to work anymore with Android 12.
  • (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 HttpClient instead 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 Streamer with: Streamer(parsers = listOf(EpubParser(reflowablePositionsStrategy = OriginalLength(pageLength = 1024))))

Navigator

  • The order of precedence of Locator locations in the reflowable EPUB navigator is: text, HTML ID, then progression. 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 on locations.position if the page= fragment identifier is missing.

OPDS

  • Links in an OPDS 2 feed are normalized to the feed base URL.