Intelligent AR measurement app for Android
AR Dimension combines Google ARCore for spatial awareness with Google Gemini Vision API for scene understanding to provide accurate room and object measurements without manual calibration.
- 📏 Automatic Room Measurement - Point at a room and get dimensions instantly
- 🤖 AI-Powered Analysis - Gemini Vision API understands scenes and estimates dimensions
- 🎯 ARCore Integration - Accurate plane detection and spatial tracking
- 📱 No Calibration - Just point and measure
- 💾 Measurement History - Save and review past measurements
- 🎨 Material 3 Design - Modern, clean interface
- Language: Kotlin
- AR: Google ARCore (plane detection, anchors)
- Vision AI: Google Gemini Vision API
- Camera: Camera2 API
- Database: Room Database
- UI: Jetpack Compose
- Async: Kotlin Coroutines
- Architecture: Clean separation (UI, data, networking, AR)
- Android device with ARCore support
- Android 9.0 (API 28) or higher
- Camera permission
Recommended: Samsung Galaxy Fold 6 or similar ARCore-capable device
Check device compatibility: https://developers.google.com/ar/devices
- Android Studio Hedgehog (2023.1.1) or later
- JDK 17
- Google Gemini API key
git clone <repository-url>
cd TapMeasure- Visit https://makersuite.google.com/app/apikey
- Sign in with Google account
- Create API key
- Copy the key
cp local.properties.example local.propertiesEdit local.properties:
GEMINI_API_KEY=your_actual_api_key_hereOpen project in Android Studio and run on ARCore-compatible device.
Or use command line:
./gradlew installDebug- Architecture Guide - Component design, data flow, design decisions
- Developer Setup - Detailed setup instructions, troubleshooting
- API Integration - Gemini API usage, prompt engineering, examples
app/src/main/java/com/ardimension/
├── ar/ # ARCore integration (planes, anchors)
├── camera/ # Camera2 API (frame capture, permissions)
├── gemini/ # Gemini Vision API (client, prompts, parser)
├── data/ # Data layer (models, database, repository)
│ ├── model/ # Domain models
│ ├── database/ # Room entities, DAOs
│ └── repository/ # Data access abstraction
├── util/ # Utilities (bitmap, logging, constants)
├── config/ # App configuration
└── MainActivity.kt # Main entry point
- ARCoreManager - Session lifecycle management
- PlaneDetector - Floor, wall, ceiling detection
- AnchorManager - 3D position tracking
- GeminiClient - API communication with retry logic
- PromptGenerator - Structured prompts for scene/object analysis
- ResponseParser - JSON parsing with validation
- Room Database - Local measurement storage
- Repository Pattern - Clean data access API
- Data Models - Validated domain objects
- Launch App - Grant camera permissions
- Point Camera - Aim at room or object
- Auto-Analysis - Gemini AI analyzes scene (2 fps)
- View Dimensions - See estimated measurements
- Save - Store measurements for later
./gradlew test- Kotlin coding conventions
- 4 spaces indentation
- 120 character line length
- KDoc comments for public APIs
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
- Frame Rate: 2 fps (controlled to reduce API calls)
- API Timeout: 5 seconds
- Retries: Up to 2 retries with exponential backoff
- Confidence Threshold: 0.5 minimum, 0.65+ considered reliable
- Real-time AR dimension overlay
- Export measurements (PDF/CSV)
- Multi-room floor plans
- Object database for improved accuracy
- Offline mode with local ML
- User calibration mode
- ARCore requires supported hardware
- Gemini API rate limits (60/min, 1500/day free tier)
- Accuracy depends on lighting and scene clarity
- Large rooms (>20m) may have reduced accuracy
[Your License Here]
- ARCore: Google AR platform
- Gemini: Google's multimodal AI
- Jetpack: Android modern development toolkit
- Issues: Open GitHub issue
- Documentation: See
/docsfolder - Stack Overflow: Tag
arcore,gemini-api
[Your Contact Information]
Built with ❤️ for intelligent AR measurement