Skip to content

3.0.0-alpha.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@mickael-menu mickael-menu released this 19 Jan 14:46
· 76 commits to main since this release
361d2d4

Resources

Changelog

⚠️ Please consult the migration guide to assist you in handling the breaking changes in this latest major release.

Added

Shared

  • A new Format type was introduced to augment MediaType with more precise information about the format specifications of an Asset.
  • The DownloadManager interface handles HTTP downloads. Components like the LcpService rely on it for downloading publications. Readium v3 ships with two implementations:
    • ForegroundDownloadManager uses an HttpClient to download files while the app is running.
    • AndroidDownloadManager is built upon Android's DownloadManager to manage HTTP downloads, even when the application is closed. It allows for resuming downloads after losing connection.
  • The default ZipArchiveOpener now supports streaming ZIP archives, which enables opening a packaged publication (e.g. EPUB or LCP protected audiobook):
    • served by a remote HTTP server,
    • accessed through an Android ContentProvider, such as the shared storage.

Navigator

  • Support for keyboard events in the EPUB, PDF and image navigators. See VisualNavigator.addInputListener().

LCP

  • You can now stream an LCP protected publication using its LCP License Document. This is useful for example to read a large audiobook without downloading it on the device first.
  • The hash of protected publications is now verified upon download.

Changed

  • ⚠️ To avoid conflicts when merging your app resources, all resources declared in the Readium toolkit now have the prefix readium_. This means that you must rename any layouts or strings you have overridden. Some resources were removed from the toolkit. Please consult the migration guide.
  • Most APIs now return an Error instance instead of an Exception in case of failure, as these objects are not thrown by the toolkit but returned as values

Shared

  • ⚠️ To improve the interoperability with other Readium toolkits (in particular the Readium Web Toolkits, which only work in a streaming context) Readium v3 now generates and expects valid URLs for Locator and Link's href. You must migrate the HREFs or Locators stored in your database, please consult the migration guide.
  • Link.href and Locator.href are now respectively Href and Url objects. If you still need the string value, you can call toString()
  • MediaType no longer has static helpers for sniffing it from a file or URL. Instead, you can use an AssetRetriever to retrieve the format of a file.

Navigator

  • Version 3 includes a new component called DirectionalNavigationAdapter that replaces EdgeTapNavigation. This helper enables users to navigate between pages using arrow and space keys on their keyboard or by tapping the edge of the screen.
  • The onTap and onDrag events of VisualNavigator.Listener have been deprecated. You can now use multiple implementations of InputListener with VisualNavigator.addInputListener().

Streamer

  • The Streamer object has been deprecated in favor of components with smaller responsibilities: AssetRetriever and PublicationOpener.

LCP

  • LcpService.acquirePublication() is deprecated in favor of LcpService.publicationRetriever(), which provides greater flexibility thanks to the DownloadManager.
  • The way the host view of a LcpDialogAuthentication is retrieved was changed to support Android configuration changes.

Deprecated

  • Both the Fuel and Kovenant libraries have been completely removed from the toolkit. With that, several deprecated functions have also been removed.

Shared

  • The putPublication and getPublication helpers in Intent are deprecated. Now, it is the application's responsibility to pass Publication objects between activities and reopen them when necessary.

Navigator

  • EPUB external links are no longer handled by the navigator. You need to open the link in your own Web View or Chrome Custom Tab.