Skip to content

feat: add the markview android app - #46

Merged
szdytom merged 17 commits into
mainfrom
codex/markview-android
Oct 4, 2026
Merged

szdytom merged 17 commits into
mainfrom
codex/markview-android

Conversation

@szdytom

@szdytom szdytom commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Run the complete Markview reader on Android 9+ using a NativeActivity and the shared Rust application, typography and GPU renderer. The installed app is Markview; MV4A names the Android subproject in documentation.

  • Share desktop settings, MVSS styles, fonts, tabs, reading positions, image decoding/cache, search, Contents and PDF/PNG export.
  • Embed KaTeX fonts in debug and release builds, so formulas and PDF exports retain their mathematical faces away from the build machine. Add Droid Sans Mono immediately before the generic monospace fallback in builtin and artist MVSS themes.
  • Select phone/tablet mode with Android sw600dp. Phones stay in portrait, fill the available reading width and manage tabs in a left drawer; tablets keep the desktop tab strip, adjustable columns and rotation. A right swipe opens phone Tabs; a left swipe opens Contents on any touchscreen. Repeated swipes keep an open drawer open.
  • Adapt settings and font controls to narrow screens, using fullscreen settings below 640 logical pixels and centered dialogs on wider screens. Hide desktop-only settings-file/folder, window-layout and single-instance controls on Android; hide Scroll Speed on Android and Column Width/tab-style choices on phones. Ignore incompatible saved desktop runtime options while preserving shared preferences.
  • Match the top system-bar background to the toolbar and the bottom system-bar background to the footer, in light and dark styles. Keep controls inside the safe area and suppress extra navigation contrast scrims and divider lines.
  • Bridge system file/folder pickers, Open with/Share, clipboard and save destinations. Private document copies retain relative images and Markdown links; file grants are read-only. Reimport folders by replacing the previous tree, removing deleted files and retaining the previous copy if importing fails.
  • Exit cleanly on Activity destruction and allow repeated recreation in the same process. Clear native session state and reject stale callbacks from a destroyed Activity. Rotation and suspension retain tabs; actual Activity destruction or process termination starts a fresh tab session while retaining preferences.
  • Restore automatic local-image refresh on all platforms, preserve bounded intrinsic image sizes across cached tabs and release JNI local references after every bridge call.
  • Include SDK/NDK packaging for arm64-v8a and x86_64, build documentation, headless emulator integration tests and Android mode/smallest-width diagnostics.
  • Run headless API 35 phone/tablet and sw599dp/sw600dp integration tests in GitHub Actions and require Android success for CI and release publication. Hosted emulators use AOSP images with gesture navigation, four cores and 4 GiB RAM to reduce Google-services load; instrumentation closes Quickstep/Pixel Launcher ANR dialogs and waits for reader focus; builds explicitly select NDK 29. Instrumentation synchronizes and intercepts PDF/PNG preview intents while validating real provider output, keeping external viewers from capturing later reader input. Startup assertions wait for viewport and reading-width layout to settle. Picker cancellation waits for Activity window focus and settled layout before subsequent input; failures retain a screenshot and reader state before instrumentation finishes. Attach a universal signed APK and SHA256 checksum to version-tag releases and add Android to the release download table. PR release builds use a separate generated development key; distribution signing credentials are only provided to the tag-release signing step.

Android lifecycle support pins our winit 0.30.13 fork. Track upstream Destroy handling #4303, event-loop recreation #3325 and Destroy fix #4711; return to a published upstream release once both lifecycle fixes pass the Activity integration tests.

Validation

  • GitHub CI and Packages pass for both push and PR events, and the PR Release workflow passes on f06f7a1 (51 checks pass; publication-only jobs skip on PRs). The downloaded universal PR APK independently passes signature, 16 KiB alignment and SHA256 checksum verification.
  • 1,041 workspace tests pass with cargo test --workspace --locked; formatting and workspace Clippy with -D warnings pass.
  • Universal debug APK builds for arm64-v8a and x86_64, with verified 16 KiB APK alignment. Physical ARM64 testing remains outstanding.
  • Full API 35 Pixel 6 (sw411dp) and Pixel Tablet (sw800dp) suites pass on headless emulators. The phone suite also passes with three-button navigation.
  • Pixel assertions verify system-bar/reader-chrome color continuity in light and dark styles. Device tests cover drawer swipes, keyboard/safe areas, rotation, settings/fonts/styles, folder deletion refresh and failed-import rollback, PDF saving with explicit KaTeX font-presence assertions and GPU PNG export.
  • Repeated same-process Activity recreation, finish/reopen and Don't keep activities pass, including durable preferences, fresh sessions and rejection of stale I/O callbacks. The local-image regression replaces a PNG and verifies refreshed dimensions, version and pixels without pixel demand.
  • Full phone/tablet suites and sw599dp/sw600dp boundary suites pass on headless API 35 AOSP images with gesture navigation, emulator 36.1.8 and Mesa software Vulkan, matching the new CI renderer. A full phone and boundary run also passes after deliberately inducing a real Quickstep ANR before instrumentation. Whole-document PNG and restored-image-tab GPU regressions were also validated.
  • Distribution-signed universal release APK passes signature and 16 KiB alignment verification; its signing certificate differs from the development APK. Build orchestration tests cover debug, PR release and distribution release signing, and release-notes tests cover Android package/checksum links and missing assets. Actionlint, ShellCheck and dist generate --check pass.

Current emulator screenshots

All 11 Android screenshots are refreshed from the current debug APK on API 35 headless emulators. The captures include corrected mathematical faces, monospace code, both drawer styles, phone settings, diagnostics and tablet layouts. Drawer and tablet-tab captures are now generated by the integration suite.

Light, gesture navigation Dark, gesture navigation Light, three-button navigation
Light phone reader with matching system bars Dark phone reader with KaTeX mathematics and monospace code Light reader with three-button navigation
Settings Font catalogue Dark styles
Phone settings Shared font catalogue Dark stylesheet selection
Light Tabs Drawer Dark Tabs Drawer Diagnostics
Light phone Tabs Drawer Dark phone Tabs Drawer Android mobile mode diagnostics

Tablet tabs in landscape:

Tablet reader with horizontal tabs in landscape

Centered tablet settings:

Centered settings on a wide tablet in landscape

@szdytom szdytom added enhancement New feature or request Android This is related to Android specific behaviors labels Oct 4, 2026
@szdytom
szdytom force-pushed the codex/markview-android branch from cd92dc4 to 1bf9544 Compare October 4, 2026 07:06
@szdytom
szdytom force-pushed the codex/markview-android branch 6 times, most recently from a459b61 to 8ee2acf Compare October 4, 2026 10:36
@szdytom
szdytom force-pushed the codex/markview-android branch from 8ee2acf to f06f7a1 Compare October 4, 2026 10:49
@szdytom
szdytom merged commit bd948c8 into main Oct 4, 2026
55 checks passed
@szdytom
szdytom deleted the codex/markview-android branch October 4, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Android This is related to Android specific behaviors enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant