Starter Android app that scans documents, auto-crops/enhances them (via ML Kit), converts them to PDF, and saves PDFs on the user's device.
- Document scanning with edge detection and auto-crop.
- Automatic enhancement (color/contrast cleanup handled by scanner flow).
- PDF output generation.
- Save PDF to
Downloads/PDFScanneron device. - Built-in
Historyscreen listing previously saved PDFs. - One-tap
OpenandDeleteactions for every saved PDF. - One-tap
Shareaction for every saved PDF. - Tablet-compatible adaptive UI (phone and tablet layouts).
- Kotlin
- Jetpack Compose
- Google ML Kit Document Scanner API (
play-services-mlkit-document-scanner) - MediaStore for scoped-storage save
app/src/main/java/com/akuras/pdfscanner/MainActivity.kt: scan flow + save to Downloads + adaptive UI.app/src/main/java/com/akuras/pdfscanner/ui/theme/*: Compose theme setup.app/src/main/res/*: manifest resources, themes, launcher icon assets.
- Open this folder in Android Studio.
- Let Gradle sync.
- Run the
appconfiguration on a phone/tablet emulator or real device.
Notes:
- This app targets Android SDK 35 and min SDK 26.
- The scanner relies on Google Play services and works best on Play-enabled devices/emulators.
- On every push to
mainormaster, GitHub Actions builds a release APK. - The workflow creates a GitHub Release with tag
v1.0.<run_number>and uploads the APK asset. - CI injects app version values so each APK has an increasing
versionCode(run_number). - When the app opens, it checks the latest release from
akuras22/PDFScanner. - If a higher version is available, the app shows an update dialog and opens the download URL.
- User taps
Scan Document. - ML Kit scanner UI opens and handles detection, crop, and enhancement.
- Scanner returns a PDF
Uri. - App copies that PDF into MediaStore at
Downloads/PDFScanner/scan_YYYYMMDD_HHMMSS.pdf.
- The app uses window size classes and switches to a two-pane layout on wider screens.
- PDF list/history screen (load from app-indexed records).
- Rename actions after save.
- Optional per-page image export.
- UI tests and instrumentation tests.