Skip to content

ailoadtech/qr_ean_universalreader_app

Repository files navigation

QR EAN Scanner - Android Application

A native Android application with NO advertising that reads 10+ barcode and EAN formats from camera, gallery, or file system, with copy/share/browser integration.

Features

Supported Barcode Formats

✅ Fully Supported (via ZXing)

  • QR Code (standard)
  • EAN-8 / EAN-13 (retail barcodes - supplements handled automatically)
  • Aztec Code
  • Data Matrix
  • PDF417
  • Code 128, Code 39, Code 93
  • UPC-A / UPC-E
  • Codabar
  • ITF
  • iQR (partial support)

Core Functionality

  • Live Camera Scanning: Real-time barcode detection using CameraX
  • Gallery/File Decoding: Select images from device storage
  • Copy to Clipboard: One-tap copy of decoded text
  • Share: Android ShareSheet integration
  • URL Detection: Automatically detect and open HTTP/HTTPS links in browser
  • Dark Mode: Material Design 3 theming
  • Torch Control: Toggle flashlight for low-light scanning

Screenshot

App Screenshot App Screenshot App Screenshot

Requirements

  • Android 7.0 (API 24) or higher
  • Camera permission (for live scanning)
  • Storage/Media permission (for gallery/file access)

Building the APK

Prerequisites

  1. Install Android Studio (Arctic Fox or newer)
  2. Configure Android SDK with API 34

Build Steps

  1. Clone/Copy source to local directory (this repository)

  2. Open in Android Studio:

    • File → Open → Select project root directory
    • Wait for Gradle sync to complete
  3. Sync Gradle:

    • Click "Sync Now" if prompted, or
    • Tools → Sync Project with Gradle Files
  4. Build APK:

    • Debug APK: Build → Build Bundle(s) / APK(s) → Build APK(s)
    • Release APK: Build → Generate Signed Bundle / APK → APK → Follow wizard

Command Line Build

# Debug build
./gradlew assembleDebug

# Release build (unsigned)
./gradlew assembleRelease

# Output APKs:
# Debug: app/build/outputs/apk/debug/qruniversalreader.apk
# Release: app/build/outputs/apk/release/qruniversalreader.apk (after manual rename)

Project Structure

app/
├── src/main/
│   ├── java/com/mindvox/barcodescanner/
│   │   ├── MainActivity.kt           # Entry point, navigation
│   │   ├── scanner/
│   │   │   ├── BarcodeScanner.kt     # Facade interface
│   │   │   ├── CameraScanner.kt      # CameraX-based scanning
│   │   │   ├── FormatRegistry.kt     # Decoder routing
│   │   │   └── ImageDecoder.kt       # Gallery/file decoding
│   │   ├── decoder/
│   │   │   ├── ZXingDecoder.kt       # Primary decoder (10+ formats)
│   │   │   ├── BeeTaggDecoder.kt     # Placeholder (discontinued)
│   │   │   ├── ShotCodeDecoder.kt    # Placeholder (obsolete)
│   │   │   └── DecodeResult.kt       # Result data class
│   │   ├── ui/
│   │   │   ├── ResultFragment.kt     # Result display & actions
│   │   │   ├── CameraFragment.kt     # Camera preview
│   │   │   └── FilePickerFragment.kt # Gallery/file picker
│   │   └── util/
│   │       ├── ClipboardHelper.kt    # Clipboard operations
│   │       ├── ShareHelper.kt        # Android ShareSheet
│   │       ├── UrlDetector.kt        # URL validation
│   │       └── PermissionHelper.kt   # Runtime permissions
│   ├── res/
│   │   ├── layout/                   # XML layouts
│   │   ├── values/                   # Strings, colors, themes
│   │   ├── drawable/                 # Icons and graphics
│   │   ├── menu/                     # Navigation menu
│   │   └── xml/                      # Backup rules
│   └── AndroidManifest.xml
├── build.gradle.kts                  # App-level build config
└── proguard-rules.pro                # ProGuard/obfuscation rules

Usage

Camera Scanning

  1. Launch the app
  2. Grant camera and storage permissions when prompted
  3. Point camera at barcode
  4. Barcode is automatically detected and decoded
  5. View result with action buttons

Gallery/File Decoding

  1. Tap "Gallery" in bottom navigation
  2. Pick an image from device storage
  3. App decodes barcode from selected image
  4. View result with action buttons

Result Actions

  • Copy: Copy decoded text to clipboard
  • Share: Open Android ShareSheet to share via other apps
  • Open URL: If result is a valid HTTP/HTTPS URL, open in browser
  • Back: Return to previous screen

Testing

Test Images

Download sample barcode images from:

Place test images in app/src/test/resources/ or load from device.

Unit Tests

Run tests with:

./gradlew test

Instrumented Tests

Run on connected device/emulator:

./gradlew connectedAndroidTest

Known Limitations

  1. iQR Code: ZXing provides partial support. Some complex iQR codes may fail to decode.
  2. Camera Permission Denied: App gracefully degrades to gallery-only mode but live scanning is disabled.

Security Considerations

  • URL Validation: Only http:// and https:// schemes are accepted. javascript:, file:, and other dangerous URIs are rejected.
  • HTTPS Warning: Non-HTTPS URLs show warning before opening.
  • No Logging: Decoded barcode content is not logged to logcat.

Dependencies

  • ZXing Core (3.5.1): Primary barcode decoding
  • ZXing Android Embedded (4.3.0): Camera integration for ZXing
  • CameraX (1.3.0): Camera lifecycle and preview
  • Material Design 3: UI components
  • Optional: ML Kit Barcode Scanning (17.2.0) - faster QR detection (commented out)

License

This project is provided as-is for educational purposes. ZXing is licensed under Apache 2.0.

Acknowledgments

About

Made with joy and oh-my-claudecode (Chapeau) on Qwen 3.5 Plus and stepfun 3.5 Flash with /autopilot for 0 Euro in 40 minutes. This is a "Zero Code" project fully generated by AI Agents. You can hire me.

About

Android application without advertising for QR and EAN codes via camera, photoalbum or filesystem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors