Initial commit: Norwegian emergency shelter finder app

Android app (Kotlin) that locates the nearest public shelter (tilfluktsrom)
in Norway. Designed for offline-first emergency use.

Features:
- Downloads and caches all 556 Norwegian shelter locations from Geonorge
- GPS-based nearest shelter finding with distance and bearing
- OSMDroid map with offline tile caching for surroundings
- Large directional compass arrow pointing to selected shelter
- Compass sensor integration for real-time direction updates
- Shows 3 nearest shelters with distance, capacity, and address
- Toggle between map view and compass/arrow view
- Auto-caches map tiles on first launch for offline use
- Weekly background data refresh with manual force-update
- i18n: Norwegian Bokmål, Nynorsk, and English

Technical:
- EPSG:25833 (UTM33N) → WGS84 coordinate conversion
- Haversine distance and bearing calculations
- Room database for shelter persistence
- Fused Location Provider for precise GPS
- Sensor fusion (rotation vector with accel+mag fallback) for compass

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2026-03-08 16:14:19 +01:00
commit 27cad094e7
44 changed files with 2222 additions and 0 deletions

View file

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Tilfluktsrom</string>
<!-- Status messages -->
<string name="status_ready">Ready</string>
<string name="status_loading">Loading shelter data&#8230;</string>
<string name="status_updating">Updating&#8230;</string>
<string name="status_offline">Offline mode</string>
<string name="status_shelters_loaded">%d shelters loaded</string>
<string name="status_no_location">Waiting for GPS&#8230;</string>
<string name="status_caching_map">Caching map for offline use&#8230;</string>
<!-- Loading screen -->
<string name="loading_shelters">Downloading shelter data&#8230;</string>
<string name="loading_map">Caching map tiles&#8230;</string>
<string name="loading_first_time">Setting up for first use&#8230;</string>
<!-- Shelter info -->
<string name="shelter_capacity">%d places</string>
<string name="shelter_room_nr">Room %d</string>
<string name="nearest_shelter">Nearest shelter</string>
<string name="no_shelters">No shelter data available</string>
<!-- Actions -->
<string name="action_refresh">Refresh data</string>
<string name="action_toggle_view">Toggle map/compass view</string>
<!-- Permissions -->
<string name="permission_location_title">Location permission required</string>
<string name="permission_location_message">This app needs your location to find the nearest shelter. Please grant location access.</string>
<string name="permission_denied">Location permission denied. The app cannot find nearby shelters without it.</string>
<!-- Errors -->
<string name="error_download_failed">Could not download shelter data. Check your internet connection.</string>
<string name="error_no_data_offline">No cached data available. Connect to the internet to download shelter data.</string>
<string name="update_success">Shelter data updated</string>
<string name="update_failed">Update failed — using cached data</string>
</resources>