Legg til automatisk widgetoppdatering og de-Google-retningslinjer (v1.3.1)
Widget oppdaterer seg sjølv via WorkManager kvar 15. min i bakgrunnen, og i sanntid når appen er open og mottek GPS-oppdateringar. Oppdaterer CLAUDE.md med de-Google-kompatibilitetsprinsipp. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a813edc0c3
commit
3c49dbdcde
6 changed files with 95 additions and 5 deletions
18
CLAUDE.md
18
CLAUDE.md
|
|
@ -3,13 +3,28 @@
|
|||
## Project Overview
|
||||
Android app (Kotlin) that helps find the nearest public shelter (tilfluktsrom) in Norway during emergencies. Offline-first design: must work without internet after initial data cache.
|
||||
|
||||
## Design Principles
|
||||
|
||||
### De-Google Compatibility
|
||||
The app must work on devices without Google Play Services (e.g. LineageOS, GrapheneOS, /e/OS). Every feature that uses a Google-specific API must have a fallback that works without it. Use Google Play Services when available for better accuracy/performance, but never as a hard dependency.
|
||||
|
||||
**Pattern**: Check for Play Services at runtime, fall back to AOSP/standard APIs.
|
||||
- **Location**: Prefer FusedLocationProviderClient (Play Services) → fall back to LocationManager (AOSP)
|
||||
- **Maps**: OSMDroid (no Google dependency)
|
||||
- **Database**: Room/SQLite (no Google dependency)
|
||||
- **Background work**: WorkManager (works without Play Services via built-in scheduler)
|
||||
|
||||
### Offline-First
|
||||
This is an emergency app. Assume internet and infrastructure may be degraded or unavailable. All core functionality (finding nearest shelter, compass navigation, sharing location) must work offline after initial data cache. Avoid solutions that depend on external servers being reachable.
|
||||
|
||||
## Architecture
|
||||
- **Language**: Kotlin, targeting Android API 26+ (Android 8.0+)
|
||||
- **Build**: Gradle 8.7, AGP 8.5.2, KSP for Room annotation processing
|
||||
- **Maps**: OSMDroid (offline-capable OpenStreetMap)
|
||||
- **Database**: Room (SQLite) for shelter data cache
|
||||
- **HTTP**: OkHttp for data downloads
|
||||
- **Location**: Google Play Services Fused Location Provider
|
||||
- **Location**: FusedLocationProviderClient (Play Services) with LocationManager fallback
|
||||
- **Background**: WorkManager for periodic widget updates
|
||||
- **UI**: Traditional Views with ViewBinding
|
||||
|
||||
## Key Data Flow
|
||||
|
|
@ -29,6 +44,7 @@ no.naiv.tilfluktsrom/
|
|||
├── data/ # Room entities, DAO, repository, GeoJSON parser, map cache
|
||||
├── location/ # GPS location provider, nearest shelter finder
|
||||
├── ui/ # Custom views (DirectionArrowView), adapters
|
||||
├── widget/ # Home screen widget, WorkManager periodic updater
|
||||
└── util/ # Coordinate conversion (UTM→WGS84), distance calculations
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue