Android app with offline-first architecture and EXIF geolocation for civic issue reporting
Android mobile app for civic issue reporting. Citizens capture photos of potholes, garbage, fallen treesβapp auto-extracts GPS, compresses images, and syncs with backend platform for ML severity analysis.
Mobile-Specific Features:
Backend System: See Project Clean Backend for TensorFlow CNN severity classification, priority algorithm, and municipal dashboard.
Published in International Research Journal of Engineering and Technology (IRJET)β.
Pain Point
Citizens report issues like "near the park" or "on Main Street." Field teams waste hours searching. Text addresses have typos, informal landmarks are ambiguous.
Solution
App captures GPS when photo is takenβnot when submitted later. Embeds coordinates in EXIF metadata. Extracts location even if user submits hours later from home. Reverse geocoding generates street address.
Implementation: FusedLocationProviderClient requests GPS on camera open. Coordinates embedded in image EXIF. Submission extracts EXIF data, not current location. Fallback prompts manual confirmation if EXIF missing.
Impact
Pain Point
Citizens discover issues in rural roads, underground parking, remote areas with poor connectivity. Real-time submission fails, issues forgotten.
Solution
Local storage as source of truth. Submissions save immediately to device with success feedback. Background service monitors network, auto-uploads when available. Exponential backoff retry, conflict resolution for duplicate offline submissions.
Implementation: SharedPreferences stores queued submissions. Background WorkManager monitors connectivity. Visual sync indicators show pending uploads. Retry logic handles transient failures.
Impact
Pain Point
Smartphone cameras produce 4-8MB images. Drains data plans, causes timeouts. Aggressive compression degrades quality below ML analysis threshold.
Solution
Multi-stage compression: resize to 1920x1080, JPEG quality 75. Produces 400-600KB files while preserving edges, textures for ML model. Progressive upload with chunking.
Implementation: Adaptive quality settings based on dimensions. Compression preview for user verification. Chunked multipart upload via Retrofit.
Impact
Key Decisions: Native Kotlin for sensor access. Offline-first for field reliability. Server-side ML avoids 100MB+ model. 512KB compression for 3G networks.
Backend: See Project Clean Backend for Django REST API, TensorFlow CNN, and priority algorithm.
π One-Tap Reporting - under 30 seconds capture to submit
β‘ 512KB Compression - 85% reduction, 92%+ ML accuracy
π± Offline Queue - Zero-connectivity reporting
π EXIF Geolocation - Moment-of-capture GPS
π― Public Feed - View, upvote community issues
π Background Sync - Auto-upload when network returns
1. EXIF Location Timing
Problem: Citizens take photos on-site but submit hours later from home. GPS at submission time shows home address, not issue location.
Solution: Two-phase capture. Camera open requests GPS from FusedLocationProviderClient, embeds in EXIF. Submission extracts EXIF coordinates, not current location. Fallback for gallery photos prompts manual confirmation.
Impact: 100% location accuracy for in-app camera. Zero incorrect locations reported by field teams.
2. Image Compression Pipeline
Problem: 4-8MB smartphone images drain data, cause timeouts. Aggressive compression degrades ML accuracy.
Solution: Multi-stage pipeline. Resize to 1920x1080, JPEG quality 75. Produces 400-600KB preserving edges, textures. Progressive upload with chunking.
Impact: 85% size reduction (5MB β 512KB). 92%+ ML accuracy maintained. Upload success 73% β 96% in 3G.
3. Offline-First Data Flow
Problem: Poor connectivity in rural/underground areas. Real-time requirements lead to forgotten reports.
Solution: Local storage as source of truth. Immediate save to device, success feedback. Background service monitors network, auto-uploads. Exponential backoff, conflict resolution.
Impact: Zero-connectivity reporting enabled. 34% higher completion rates. Batch-upload on reconnection.
| Category | Technologies |
|---|---|
| Mobile | Kotlin, Android SDK (API 21-31), Material Design, ViewBinding |
| Networking | Retrofit 2.9.0, OkHttp 4.9.3, Gson, Multipart Upload |
| Location | Google Play Services, FusedLocationProviderClient, Geocoder API |
| UI/UX | CircleImageView, ImagePicker, Shimmer, RecyclerView Adapters |
Backend Platform: See Project Clean Backend for ML severity analysis, priority algorithm, and municipal dashboard.