Yet another code scanner for Android. Simple, fast, and ad-free.
CodeLens is a minimalist QR & Barcode scanner built with modern Android technologies. It offers flexibility by supporting both a standard in-app camera scanner and a lightweight Google Play Services (GMS) scanner.
- Dual Scanning Modes:
- CameraX Mode (Default): Uses the device camera with ML Kit for fast, offline scanning within the app. Requires camera permission.
- GMS Quick Scan: Leverages the Google Play Services Code Scanner for instant, installation-free scanning without requiring camera permissions in the app itself.
- Quick Settings Tiles:
- Scan (扫一扫): Launches the default in-app CameraX scanner.
- Quick Scan (快速扫描): Directly launches the GMS barcode scanner overlay for rapid capture.
- Smart Actions:
- Automatically detects URLs and opens them in your default browser.
- Copies plain text to clipboard.
- Supports Magnet links and custom URI schemes.
- Privacy Focused: Core logic runs entirely on-device. Uses system capabilities where possible.
- Modern UI: Built entirely with Jetpack Compose and Material 3.
- Language: Kotlin
- UI Framework: Jetpack Compose (Material 3)
- Camera Infrastructure: CameraX (with specialized
ImageAnalysisfor ML Kit) - Machine Learning:
com.google.android.gms:play-services-code-scannercom.google.mlkit:barcode-scanning
- Build System: Gradle Kotlin DSL (
.kts)
- Android Studio Hedgehog (or newer)
- JDK 17
- Android SDK API 34 (Build Tools)
- Minimum Device Support: Android 7.0 (API 24)
-
Clone the repository:
git clone https://github.com/RoyRao2333/CodeLens.git cd CodeLens -
Open the project in Android Studio.
-
Sync Gradle dependencies:
./gradlew clean build
-
Run on a connected device or emulator:
./gradlew installDebug
To generate a signed release APK, you need a keystore. We provide a helper script to set this up quickly for local development.
Run the setup script to generate a local keystore (release-key.jks) and configuration file (keystore.properties):
./setup-signing.shNote: Your secrets are stored in keystore.properties which is git-ignored to protect your privacy.
./gradlew assembleReleaseThe signed APK will be generated at:
app/build/outputs/apk/release/app-release.apk
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.