Skip to content
Android AppLive

ScanXpert

Native Android PDF engine and document scanner built with Kotlin 2.0, Jetpack Compose, CameraX, and 16 KB page-size compliance.

Overview: The Native Advantage

ScanXpert is a high-performance, single-file native PDF application and document scanner built from the ground up for modern Android devices. Most third-party document apps rely on bloated C++ native binaries (such as MuPDF or PDFium) that add 20 to 40 MB to the APK size, risk memory corruption vulnerabilities, and frequently fail Google Play’s 16 KB page-size requirement on Android 15.

I built ScanXpert around Android’s built-in PdfRenderer graphics engine. By eliminating external .so binaries entirely, the app delivers near-instant startup times, silky-smooth native scrolling physics, guaranteed Android 15+ 16 KB page-size compliance, and an exceptionally small disk footprint.

Tech Stack & Architecture

ScanXpert is engineered using contemporary Android patterns to maintain a responsive 60 FPS user interface during complex document manipulations:

com.pdf.scanxpert.scan/
├── camera/
│   ├── CameraManager.kt       # CameraX configuration, flash, zoom, grid
│   ├── DocumentAnalyzer.kt    # ML Kit real-time edge detection pipeline
│   ├── ImageProcessor.kt      # 4-point perspective warp & pro filters
│   ├── ScannerScreen.kt       # Compose master viewfinder and controls
│   ├── ScanOverlay.kt         # Custom Canvas for animated locking brackets
│   └── components/            # Template chips, haptic triggers, thumbnails
└── viewmodel/
    └── ScannerViewModel.kt    # Auto-capture stability, batch queuing, PDF export

PDF Reader Engine & Interaction

Viewing multi-hundred-page documents on mobile requires careful memory budgeting. ScanXpert avoids loading full documents into memory by utilizing an on-demand bitmap cache that dynamically renders visible pages at screen resolution:

Advanced Camera Scanner Module

The document scanning pipeline matches professional hardware scanner quality directly on mobile without sending image data off the device:

Real-Time ML Edge Detection

As you point the camera at a document, DocumentAnalyzer.kt inspects camera frames in real time. ML Kit isolates document boundaries against contrasting surfaces, drawing animated bracket overlays via ScanOverlay.kt.

Hands-Free Auto-Capture

When the document remains stable inside the bounding brackets for 1.5 seconds, the camera automatically triggers capture with configurable haptic feedback. This eliminates tap-induced camera shake and speeds up multi-page digitizations.

Perspective Correction & Processing

Raw captures undergo a 4-point perspective transform (ImageProcessor.kt) that flattens skewed angles into perfect rectangles. Users can select from three processing filters:

  1. Magic Color: Removes harsh shadows, evens out lighting, and boosts contrast for crisp readability.
  2. High-Contrast B&W: Strips color noise for clean monochrome text suited for legal filings and contracts.
  3. Original: Retains raw photographic color fidelity.

Batch Scanning & PDF Assembly

Capture multiple pages in sequence, reorder thumbnails on an interactive grid, and merge them directly into a compressed, standardized PDF document with a single tap.

Categorized Control Center

ScanXpert exposes granular settings so power users can tune performance to their workflow:

Category Available Settings Purpose
Scanner Preferences Auto-capture toggle, default filter, haptic levels (Soft/Medium/Hard/Off), capture resolution Control camera automation and capture sharpness
PDF Reader Vertical continuous vs. horizontal magazine mode, Eye Comfort night mode, ink markup color Customize reading comfort and annotation defaults
Appearance & UX System default, Deep Dark (OLED), or Light mode; quick-scan home button toggle Match system aesthetic and quick access
Storage & Privacy Internal sandbox vs. external storage destination, one-tap cache flush Manage local file paths and temporary artifacts

Next-Level Roadmap

ScanXpert is actively evolving with advanced on-device intelligence:

  1. Smart On-Device OCR: Extract and copy text from scanned PDFs without network dependencies.
  2. AI Voice Reader (TTS): Listen to document chapters on the go with background speech synthesis.
  3. AI Smart Summarizer: Generate concise 1-minute summaries of lengthy reports using local lightweight models.
  4. Specialized Scanning Modes: Book curvature flattening to remove spine distortion, and passport-size photo arrangement layouts.

Project Status & Distribution

ScanXpert is a proprietary native Android application currently in active development and internal testing. A public release targeting Android 15 and modern devices is planned for distribution once device verification concludes.

#android#pdf#scanner#kotlin#jetpack-compose

You might also like

Product

ClipVault

Open-source, fully offline clipboard manager and encrypted password vault for Android. No INTERNET permission, and you can verify that yourself.

Note

Android 10+ lets only the active keyboard read your clipboard

Why Android 10 background clipboard restrictions require an IME keyboard to capture clips.

Note

Clip types ClipVault recognizes on-device

The six content types ClipVault identifies entirely on your device.