An Android application that uses your phone's camera to scan handwritten or printed lists and convert them into editable digital list items using OCR (Optical Character Recognition).
- Camera Capture: Take photos of handwritten or printed lists
- Region Selection: Select specific areas of an image to scan (crop before OCR)
- OCR Processing: Convert scanned text to digital list items using Google Cloud Vision API
- List Management: View, edit, reorder, and manage your scanned lists
- Photo Gallery: Browse and manage captured photos
- Offline Support: Photos are stored locally; OCR requires network connectivity
- Android: API 26 (Android 8.0 Oreo) or higher
- Target SDK: 34 (Android 14)
- Java: JDK 17
- Google Cloud Platform account (for Cloud Vision API)
git clone <repository-url>
cd list-scannerThe app requires a local.properties file in the project root directory. This file is gitignored and contains your local configuration.
-
Copy the example file:
cp local.properties.example local.properties
-
Edit
local.propertiesand add your configuration:# Android SDK path (usually auto-detected by Android Studio) sdk.dir=/path/to/your/Android/Sdk # Google Cloud Vision API Key (required for OCR) CLOUD_VISION_API_KEY=your_api_key_here
The app uses Google Cloud Vision API for OCR. Follow these steps to get your API key:
- Go to the Google Cloud Console
- Click Select a project → New Project
- Enter a project name (e.g., "List Scanner") and click Create
- Wait for the project to be created, then select it
- In the Cloud Console, go to APIs & Services → Library
- Search for "Cloud Vision API"
- Click on Cloud Vision API in the results
- Click Enable
- Go to APIs & Services → Credentials
- Click + CREATE CREDENTIALS → API key
- Your new API key will be displayed - copy it
- (Recommended) Click Edit API key to add restrictions:
- Under API restrictions, select Restrict key
- Choose Cloud Vision API from the list
- Click Save
Add your API key to local.properties:
CLOUD_VISION_API_KEY=AIzaSy...your_key_hereCloud Vision API requires a billing account. Google Cloud offers:
- Free tier: 1,000 units/month for TEXT_DETECTION
- Pay-as-you-go: $1.50 per 1,000 units after free tier
See Cloud Vision Pricing for current rates.
- Open Android Studio
- Select File → Open and navigate to the project directory
- Wait for Gradle sync to complete
- Click Run → Run 'app' or press
Shift+F10
Make sure you have the Android SDK installed and JAVA_HOME set to JDK 17.
# On Linux/macOS with Android Studio's bundled JDK:
export JAVA_HOME=/path/to/android-studio/jbr
# Build debug APK
./gradlew assembleDebug
# The APK will be at: app/build/outputs/apk/debug/app-debug.apk# Install via ADB (device must be connected with USB debugging enabled)
adb install -r app/build/outputs/apk/debug/app-debug.apk# Run all unit tests
./gradlew testDebugUnitTest
# Run specific test class
./gradlew testDebugUnitTest --tests "com.listscanner.device.ImageCropServiceTest"app/src/main/kotlin/com/listscanner/
├── data/ # Database entities, DAOs, repositories
│ ├── dao/ # Room database access objects
│ ├── entity/ # Database entities (Photo, List, Item)
│ └── repository/ # Repository implementations
├── device/ # Device services (camera, OCR, network)
│ ├── CloudVisionService # Google Cloud Vision API integration
│ ├── ImageCropService # Image cropping utilities
│ └── NetworkConnectivity # Network state monitoring
├── di/ # Dependency injection
├── domain/ # Business logic and interfaces
│ ├── repository/ # Repository interfaces
│ └── service/ # Domain services
└── ui/ # UI layer (Jetpack Compose)
├── components/ # Reusable UI components
├── navigation/ # Navigation graph and destinations
└── screens/ # Screen composables and ViewModels
- Language: Kotlin
- UI: Jetpack Compose with Material 3
- Architecture: MVVM with Repository pattern
- Database: Room
- Networking: Retrofit + OkHttp
- Image Loading: Coil
- Camera: CameraX
- Async: Kotlin Coroutines + Flow
- Testing: JUnit 5, MockK, Truth
The app requires the following permissions:
CAMERA- To capture photos of listsINTERNET- To send images to Cloud Vision API for OCR
- Verify your API key is correctly set in
local.properties - Ensure the Cloud Vision API is enabled in your GCP project
- Check that billing is enabled on your GCP account
- You've exceeded the free tier limit (1,000 requests/month)
- Check your usage in GCP Console under APIs & Services → Cloud Vision API → Metrics
- Ensure you're using JDK 17
- Set
JAVA_HOMEto point to a JDK 17 installation - Android Studio's bundled JBR (JetBrains Runtime) works well:
export JAVA_HOME=/path/to/android-studio/jbr
- Ensure the image has good lighting and contrast
- Try the region selection feature to focus on specific areas
- Handwriting must be reasonably legible
This project is licensed under the MIT License - see the LICENSE file for details.