Skip to content

Releases: readium/kotlin-toolkit

3.0.2

25 Nov 12:19
89da63c
Compare
Choose a tag to compare

Resources

Changelog

Fixed

Navigator

  • Fixed the value of the scroll setting when switching from a reflowable EPUB to a fixed-layout one.

LCP

  • Fixed IndexOutOfBoundsException occurring when an LCP-protected EPUB contains incorrect original lengths in its META-INF/encryption.xml file.

Commits

Full Changelog: 3.0.1...3.0.2

3.0.1

31 Oct 16:00
885d6e5
Compare
Choose a tag to compare

Resources

Changelog

Fixed

Shared

  • Improved performance when accessing a publication from the Shared Storage.

Navigator

  • Fixed crash in the image navigator.

What's Changed

Full Changelog: 3.0.0...3.0.1

3.0.0

19 Sep 08:16
Compare
Choose a tag to compare

Resources

Changelog

If you upgrade from a 2.x version, you might want to check out the Changelog of the alpha and beta versions as well.

Fixed

Navigator

  • Fixed computing the total progression of audiobook locators.
  • Fixed starting the TTS from the current resource in a fixed-layout EPUB.

What's Changed

Full Changelog: 3.0.0-beta.2...3.0.0

2.4.3

26 Aug 08:16
Compare
Choose a tag to compare

Resources

Changelog

This release is the same as 2.4.2, with a fix for Maven Central.

  • Bump to Kotlin 1.9.24.
  • Remove JCenter dependencies.

2.4.2

22 Aug 18:35
Compare
Choose a tag to compare

Resources

Changelog

  • Bump to Kotlin 1.9.24.
  • Remove JCenter dependencies.

3.0.0-beta.1

14 May 15:21
0d6efa0
Compare
Choose a tag to compare
3.0.0-beta.1 Pre-release
Pre-release

Resources

Changelog

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

Deprecated

Navigator

  • All the completion parameters of the Navigator APIs are removed.

Changed

  • All the APIs using or returning a Date objects are now using a custom Instant type.

Shared

  • The Link property key for archive-based publication assets (e.g. an EPUB/ZIP) is now https://readium.org/webpub-manifest/properties#archive instead of archive.

LCP

  • #493 The LCP module does not require the Bluetooth permissions anymore to derive the device name.

Fixed

Navigator

  • #325 Top EPUB selections no longer break when dragging the selection handles.
  • Fixed applying preferences while the EPUB navigator fragment is being recreated.

What's Changed

Full Changelog: 3.0.0-alpha.2...3.0.0-beta.1

2.4.1

07 May 08:09
b88e104
Compare
Choose a tag to compare

Resources

Changelog

Added

LCP

  • #509 Support for the new 2.x LCP Profiles.

3.0.0-alpha.2

04 Mar 11:31
3cb8e61
Compare
Choose a tag to compare
3.0.0-alpha.2 Pre-release
Pre-release

Resources

Changelog

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

Added

Navigator

  • The new HyperlinkNavigator.Listener.shouldFollowInternalLink(Link, LinkContext?) allows you to handle footnotes according to your preference.
    • By default, the navigator now moves to the footnote content instead of displaying a pop-up as it did in version 2.x.

LCP

  • You can use LcpService.injectLicenseDocument() to insert an LCPL into a package, if you downloaded it manually instead of using LcpService.acquirePublication().

Deprecated

Shared

  • The DownloadManager introduced in version 3.0.0-alpha.1 has been removed due to the Android Download Manager introducing unnecessary complexities in the toolkit. Instead, we chose to enable apps to manually handle an LCP download with LcpService.injectLicenseDocument().

Commits

New Contributors

  • @io7m made their first contribution in #455

Full Changelog: 3.0.0-alpha.1...3.0.0-alpha.2

3.0.0-alpha.1

19 Jan 14:46
361d2d4
Compare
Choose a tag to compare
3.0.0-alpha.1 Pre-release
Pre-release

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.

2.4.0

07 Nov 14:21
011e0d7
Compare
Choose a tag to compare

Resources

Changelog

Added

Navigator

  • The EPUB backgroundColor preference is now available with fixed-layout publications.
  • New EPUBNavigatorFragment.Configuration.useReadiumCssFontSize option to revert to the 2.2.0 strategy for setting the font size of reflowable EPUB publications.
    • The native font size strategy introduced in 2.3.0 uses the Android web view's WebSettings.textZoom property to adjust the font size. 2.2.0 was using Readium CSS's --USER__fontSize variable.
    • WebSettings.textZoom will work with more publications than --USER__fontSize, even the ones poorly authored. However the page width is not adjusted when changing the font size to keep the optimal line length.
  • Scroll mode: jumping between two EPUB resources with a horizontal swipe triggers the Navigator.Listener.onJumpToLocator() callback.
    • This can be used to allow the user to go back to their previous location if they swiped across chapters by mistake.
  • Support for non-linear EPUB resources with an opt-in in reading apps (contributed by @chrfalch in #375 and #376).
    1. Override loading non-linear resources with VisualNavigator.Listener.shouldJumpToLink().
    2. Present a new EpubNavigatorFragment by providing a custom readingOrder with only this resource to the constructor.
  • Added dummy navigator fragment factories to prevent crashes caused by Android restoring the fragments after a process death.
    • To use it, set the dummy fragment factory when you don't have access to the Publication instance. Then, either finish the Activity or pop the fragment from the UI before it resumes.
      override fun onCreate(savedInstanceState: Bundle?) {
          val publication = model.publication ?: run {
              childFragmentManager.fragmentFactory = EpubNavigatorFragment.createDummyFactory()
              super.onCreate(savedInstanceState)
      
              requireActivity().finish()
              // or
              navController?.popBackStack()
      
              return
          }
      
          // Create the real navigator factory as usual...
      }

Streamer

  • The EPUB content iterator now returns audio and video elements.

Changed

Navigator

  • EpubNavigatorFragment.firstVisibleElementLocator() now returns the first block element that is visible on the screen, even if it starts on previous pages.
    • This is used to make sure the user will not miss any context when restoring a TTS session in the middle of a resource.

Fixed

Navigator

  • #360 Fix EPUB JavaScript interface injection when rotating the screen on some devices.

Streamer

  • Fixed issue with the TTS starting from the beginning of the chapter instead of the current position.