Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Releases: readium/r2-navigator-kotlin

2.1.0

23 Sep 13:57
4f066a0
Compare
Choose a tag to compare

Take a look at the migration guide

Added

  • 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.

Changed

  • Upgraded to Kotlin 1.5.31 and Gradle 7.1.1
  • 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.

Fixed

  • When restoring a Locator, The PDF navigator now falls back on locations.position if the page= fragment identifier is missing.

2.0.0

22 Apr 15:23
04b7628
Compare
Choose a tag to compare

Take a look at the migration guide

Fixed

  • Scrolling to an EPUB ID (e.g. from the table of contents) when the target spans several screens.

2.0.0-beta.2

26 Feb 15:36
c3f781e
Compare
Choose a tag to compare
2.0.0-beta.2 Pre-release
Pre-release

Take a look at the migration guide

Changed

  • R2EpubActivity and R2AudiobookActivity require a new baseUrl Intent extra. You need to set it to the base URL returned by Server.addPublication() from the Streamer.

Fixed

  • #217 Interactive HTML elements are not bypassed anymore when handling touch gestures.
    • Scripts using preventDefault() are now taken into account and do not trigger a tap event anymore.
  • #150 External links are opened in a Chrome Custom Tab instead of the navigator's web view.
  • #52 Memory leak in EPUB web views. This fixes ongoing media playback when closing an EPUB.

2.0.0-beta.1

23 Dec 10:37
8a873e9
Compare
Choose a tag to compare
2.0.0-beta.1 Pre-release
Pre-release

Take a look at the migration guide

Added

  • Support for display cutouts (screen notches).
    • IMPORTANT: You need to remove any setPadding() statement from your app in UserSettings.kt, if you copied it from the test app.
    • If you embed a navigator fragment (e.g. EpubNavigatorFragment) yourself, you need to opt-in by specifying the layoutInDisplayCutoutMode of the host Activity.
    • R2EpubActivity and R2CbzActivity automatically apply LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES to their window's layoutInDisplayCutoutMode.
    • PdfNavigatorFragment is not yet compatible with display cutouts, because of limitations from the underlying PDF viewer.
  • Customize EPUB vertical padding by overriding the r2.navigator.epub.vertical_padding dimension.

Changed

  • Upgraded to Kotlin 1.4.10.
  • All utils.js functions were moved under a readium. namespace. You will need to update your code if you were calling them manually.

2.0.0-alpha.2

29 Oct 09:38
f47ed99
Compare
Choose a tag to compare
2.0.0-alpha.2 Pre-release
Pre-release

Take a look at the migration guide

Added

  • Support for the new Publication model using the Content Protection for DRM rights and the Fetcher for resource access.
  • (Experimental) New Fragment implementations as an alternative to the legacy Activity ones (contributed by @johanpoirier).
    • The fragments are chromeless, to let you customize the reading UX.
    • To create the fragments use the matching factory such as EpubNavigatorFragment.createFactory(), as showcased in R2EpubActivity.
    • At the moment, highlights and TTS are not yet supported in the new EPUB navigator Fragment.
    • This is now the recommended way to integrate Readium in your applications.

Changed

  • currentLocator is now a StateFlow instead of LiveData, to better support chromeless navigators such as an audiobook navigator.
    • If you were observing currentLocator in a UI context, you can continue to do so with currentLocator.asLiveData().
  • Improvements to the PDF navigator:
    • The navigator doesn't require PDF publications to be served from an HTTP server anymore. A side effect is that the navigator is now able to open larger PDF files.
    • PdfNavigatorFragment.Listener::onResourceLoadFailed() can be used to report fatal errors to the user, such as when trying to open a PDF document that is too large for the available memory.
    • A dedicated PdfNavigatorFragment.createFactory() was added, which deprecates the use of NavigatorFragmentFactory.

Fixed

  • Prevent switching to the next resource by mistake when scrolling through an EPUB resource in scroll mode.

2.0.0-alpha.1

11 Aug 14:53
ac67a46
Compare
Choose a tag to compare
2.0.0-alpha.1 Pre-release
Pre-release

Added

  • The position is now reported in the locators for EPUB, CBZ and PDF.
  • (Experimental) PDF navigator.
    • Supports both single PDF and LCP protected PDF.
    • As a proof of concept, it is implemented using Fragment instead of Activity. R2PdfActivity showcases how to use the PdfNavigatorFragment with the new NavigatorFragmentFactory.
    • The navigator is based on AndroidPdfViewer, which may increase the size of your apps. Please open an issue if this is a problem for you, as we are considering different solutions to fix this in a future release.

Changed

Deprecated

  • Navigator.currentLocation and NavigatorDelegate.locationDidChange() are deprecated in favor of a unified Navigator.currentLocator, which is observable thanks to LiveData.

Fixed

1.1.6: Merge pull request #111 from readium/fixes/seach-locators

16 Jan 14:22
6096daf
Compare
Choose a tag to compare
fixes current locator issue after search

1.1.5: Merge pull request #110 from readium/develop

11 Jan 01:19
7e07395
Compare
Choose a tag to compare

1.1.4: Merge pull request #108 from readium/fixes/debug

28 Dec 19:47
7883676
Compare
Choose a tag to compare
wrap timber logs to only show in debug builds and source formatting

1.1.3

09 Sep 13:49
Compare
Choose a tag to compare
1.1.3 Pre-release
Pre-release
r2 dependency updates