Android offline mode with Room database
Overview
Offline-first architecture using Android Room database and WorkManager.
Implementation
- Room database for local storage (150MB capacity)
- WorkManager for background sync (WiFi + charging only)
- Repository pattern for data layer
- Server-side conflict resolution
Advantages over iOS
- More storage capacity (150MB vs 75MB)
- Better background task handling
- More efficient database (Room vs AsyncStorage)
Product Requirement
Closes android-app #3 (closed) (offline mode) Aligns with ios-app #9 (closed) (@stanhu)
Battery Optimization
- Sync only on WiFi + charging
- Doze mode compatible
- WorkManager handles OS battery restrictions
Testing
- Offline scenarios covered
- Sync after 24h offline
- Low storage handling