This repository has been archived by the owner on Jul 29, 2022. It is now read-only.
2.0.0-alpha.1
Pre-release
Pre-release
mickael-menu
released this
11 Aug 13:57
·
268 commits
to develop
since this release
Added
- Support for Positions List, which provides a list of discrete locations in a publication and can be used to implement an approximation of page numbers.
- Get the visible position from the current
Locator
withlocations.position
. - The total number of positions can be retrieved with
publication.positions().size
. It is a suspending function because computing positions the first time can be expensive.
- Get the visible position from the current
- The new Format API simplifies the detection of file formats, including known publication formats such as EPUB and PDF.
- A format can be "sniffed" from files, raw bytes or even HTTP responses.
- Reading apps are welcome to extend the API with custom formats.
- Using
Link.mediaType?.matches()
is now recommended to safely check the type of a resource. - More details about the Kotlin implementation can be found in the pull request.
- In
Publication
shared models:- Support for the Presentation Hints extension.
- Support for OPDS holds, copies and availability in
Link
, for library-specific features. - Readium Web Publication Manifest extensibility is now supported for
Publication
,Metadata
, link'sProperties
and locator'sLocations
, which means that you are now able to access custom JSON properties in a manifest by creating Kotlin extensions on the shared models.
Changed
- The
Publication
shared models underwent an important refactoring and some of these changes are breaking. Please refer to the migration guide to update your codebase.- All the models are now immutable data classes, to improve code safety. This should not impact reading apps unless you created
Publication
or other models yourself. - A few types and enums were renamed to follow the Google Android Style coding convention better. Just follow deprecation warnings to update your codebase.
- All the models are now immutable data classes, to improve code safety. This should not impact reading apps unless you created
Deprecated
R2SyntheticPageList
was replaced by the aforementioned Positions List and can be safely removed from your codebase.
Fixed
- Important: Publications parsed from large manifests could crash the application when starting a reading activity. To fix this,
Publication
must not be put in anIntent
extra anymore. Instead, use the newIntent
extensions provided by Readium. This solution is a crutch until we move away fromActivity
in the Navigator and let reading apps handle the lifecycle ofPublication
themselves. - The local HTTP server was broken when provided with publication filenames containing invalid characters.
- XML namespace prefixes are now properly supported when an author chooses unusual ones (contributed by @qnga).
- The
AndroidManifest.xml
is not forcing anymoreallowBackup
andsupportsRtl
, to let reading apps manage these features themselves (contributed by @twaddington).