Material You 3 eBook/audiobook reader — Episteme fork + bookshelf-api/ABS
Find a file
Aryan 355664fbcc
Bug and crash fixes (#132)
* feat(EPUB): adapt status bar icon visibility to reader theme

Pass the reader's active isDarkTheme state to EpubReaderSystemUiController to ensure status bar icons automatically switch between light and dark to remain visible against the selected background/page color.

* Implement storage tracking and optimize cache management

This commit introduces a `StorageTracker` to monitor disk usage and implements several optimizations to prevent cache bloat and handle orphaned files.

* refactor: unify book extraction paths and fix cache leaks

- Replaced random UUID and title-based hashing with stable `bookId` for extraction directories across Epub, Mobi, and FB2 parsers.
- Standardized all temporary extraction paths to `cache/imported_file_${bookId}`.
- Updated MainViewModel and MetadataExtractionWorker to provide the mandatory `bookId` during parsing.
- Ensured `clearImportedFileCache` successfully targets the correct directories on book deletion.
- Added a legacy cleanup task in `sweepOrphanedCache` to reclaim storage from old `extracted_epubs` folders.

* fix(pdf): handle NoClassDefFoundError for PdfPasswordException

Updated the PDF loading logic in PdfViewerScreen to catch Throwable
instead of Exception. This prevents the app from crashing when the
underlying pdfium library attempts to throw a PdfPasswordException
that is missing from the runtime classpath (NoClassDefFoundError).

* fix(tts): set language before voice to prevent variant reset

* EpubReaderScreen: increase scroll-hide ignore duration for tap toggles

Increase the threshold for ignoring tap toggles after bars are hidden by scrolling from 250ms to 400ms. This prevents accidental UI toggles caused by "sloppy taps" immediately following a scroll action.

* fix: resolve large bitmap crash on tall PDF pages

- Caps base layer bitmap dimensions to 3000px to prevent GPU texture limit crashes.
- Enables tiled rendering for large pages even at 1x zoom to maintain sharpness.
- Optimizes PdfBitmapPool to support rectangular bitmap allocations.

* Common.kt: ensure unique keys in voice list

* fix: handle ActivityNotFoundException in folder sync screen

* Improve file deletion logic and fix chapter index bounds in epub reader

* fix: ensure WebView bridge callbacks run on UI thread

This resolves a WebViewMethodCalledOnWrongThreadViolation in vertical mode that was preventing chapter chunks from loading beyond the initial viewport.
2026-03-30 21:19:27 +05:30
.github ci: Add CLA Assistant workflow (#61) 2026-03-12 22:05:44 +05:30
app Bug and crash fixes (#132) 2026-03-30 21:19:27 +05:30
docs docs: Revamp README and add APK naming convention (#2) 2026-02-25 19:54:43 +05:30
fastlane/metadata/android/en-US update description, phone images and feature graphic in fastlane (#67) 2026-03-14 14:16:36 +05:30
gradle Initial commit 2026-02-24 17:37:40 +05:30
spotless Update readme (#3) 2026-02-25 21:30:28 +05:30
.gitignore docs: add CLA and CONTRIBUTING guidelines (#26) 2026-03-04 10:19:17 +05:30
build.gradle.kts docs: Revamp README and add APK naming convention (#2) 2026-02-25 19:54:43 +05:30
CLA.md docs: add CLA and CONTRIBUTING guidelines (#26) 2026-03-04 10:19:17 +05:30
CONTRIBUTING.md cla (#62) 2026-03-12 22:31:52 +05:30
gradle.properties Initial commit 2026-02-24 17:37:40 +05:30
gradlew Initial commit 2026-02-24 17:37:40 +05:30
gradlew.bat Initial commit 2026-02-24 17:37:40 +05:30
LICENSE Pdf text highlight (#49) 2026-03-09 17:37:44 +05:30
README.md docs: add Contributors section to README (#85) 2026-03-17 14:04:07 +05:30
settings.gradle.kts build: remove foojay-resolver-convention plugin for f-droid compliance (#12) 2026-02-27 15:08:39 +05:30

Episteme Reader Icon  Episteme Reader

A native Android document reader application built with Kotlin and Jetpack Compose.

Get it on F-DroidGet it on Google Play


Episteme Reader Preview

Overview

Episteme Reader is an offline-first, privacy-focused document and e-book reader that supports PDF, EPUB, MOBI, AZW3, Markdown, HTML, and plain text.

Note: This is the Open Source (OSS) edition of Episteme Reader. The version available on the Google Play Store is built from this core but includes additional proprietary features.

Features

Supported Formats

  • Documents: PDF
  • E-books: EPUB, MOBI, AZW3
  • Text: MD, TXT, HTML

PDF Features

  • Viewing Modes: Vertical Scroll and Paginated view.
  • Ink Annotations: Draw directly on pages using Pen, Highlighter, and Eraser tools.
  • Text Annotations: Add text notes anywhere on the page using system or custom fonts.

E-Book Features

  • Parsing: Native parsing for MOBI/AZW3 via libmobi and EPUB via Jsoup.
  • Customization: Adjust font size, line spacing, and margins.
  • Custom Fonts: Support for importing user-provided font files (.ttf, .otf).

General

  • Text-to-Speech (TTS): Read documents aloud using the system TTS engine.
  • File Management: Built-in library organization.

Architecture

  • UI: 100% Jetpack Compose (Material3).
  • Architecture: MVVM with Unidirectional Data Flow.
  • Database: Room (SQLite) for metadata and annotations.
  • PDF Engine: pdfium-android (Native PDFium bindings).
  • EPUB Engine: Utilizes standard WebView for vertical scrolling mode, and a custom rendering engine for paginated mode.
  • Mobi Engine: Custom JNI bindings to libmobi.

Building from Source

  1. Clone the repository:

    git clone https://github.com/Aryan-Raj3112/episteme.git
    cd episteme
    
  2. Build: Open in Android Studio and run the ossDebug variant, or build from the command line:

    ./gradlew assembleOssDebug
    

    The APK will be generated at:

    app/build/outputs/apk/oss/debug/Episteme-oss-v{version}-oss-debug.apk
    

Open Source Libraries

This project is made possible by the Android open-source ecosystem:

  • Core & UI: AndroidX, Jetpack Compose, Kotlinx Serialization
  • Document Engines: PdfiumAndroidKt (PDF), libmobi (MOBI/AZW3), Google WOFF2 (Fonts)
  • Parsers: Jsoup (HTML/EPUB), Flexmark (Markdown)
  • Media & Image Loading: Coil, Media3 (ExoPlayer)
  • Utilities: Room (Database), Timber (Logging)

Contributors

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.

Support

If you find Episteme Reader useful and want to support its development, please consider sponsoring. Thank you!

Sponsor on GitHub