Repository navigation
Activity Metrics
Status: Current implemented behavior. Audience: Users and contributors. Implementation:
features/activity,data/repository/ActivityRepository.kt. Navigation:Screen.Metric; widgetsSTEPS,DISTANCE,CALORIES_OUT,ACTIVE_CALORIES,FLOORS,ELEVATION,WHEELCHAIR_PUSHES. Related: Feature map, Statistics, Recording of activity.
The activity feature owns period-based detail screens for movement metrics and workout sessions. It is separate from activity recording: recording and manual activity entry create records, while these screens read and explain existing Health Connect data.
Activity metric detail screens currently cover:
- Steps.
- Distance.
- Calories burned.
- Active calories.
- Floors.
- Elevation.
- Wheelchair pushes.
The workout/session area also covers activity lists, activity detail, route preview/export, routeless workout export (TCX/CSV/FIT), heart-rate charts for workouts, activity summaries, and cardio-load context. The CSV export imports back through the CSV importer, one workout a row; see CSV import.
Health Connect does not merge workouts. Two watches worn on one walk, or a watch and its vendor app, each file their own session, and the activity statistics would add both. OpenVitals folds such sessions into one before anything counts them: two sessions whose spans overlap by at least 85 percent and whose starts and ends lie within 15 minutes of each other are the same workout, and the one carrying more (a route, a distance, a heart rate, an OpenVitals entry over another app's) is kept. Two different apps may call the same outing different things, a walk on one wrist and a hike on the other, so between sources the exercise type is not compared. Within one source two overlapping sessions of different types are two deliberate records and are both kept.
Steps and distance through the day are not touched by this: Health Connect itself keeps one app's data where several apps overlap, in the order its Data sources and priority setting lists them. That order ranks apps, not devices, so two devices syncing through the same app still add up there.
A workout's distance is the sum of the Health Connect distance records inside the session. When there are none, the route's length fills in.
Some apps save a GPS route but a distance estimated from steps, which can be half the real one. The Distance from GPS routes setting under Activities, off by default, makes a workout with a route take the route's length instead. Pace, speed, splits, the activity statistics, exports and the PDF report follow it. Workouts without a route keep their recorded distance. Routes written by other apps are readable only with the Exercise routes permission, which Health Connect grants in its own settings. The edit form still shows only the distance OpenVitals wrote.
Activity metric screens follow the shared period-detail model:
- Day, week, month, and year ranges.
- Selected anchor date.
- Previous/next period navigation.
- Calendar selection.
- Pull to refresh.
- Period charts and selected-day entry views where available.
- Statistics, comparisons, baselines, confidence, and source context.
- Reorderable metric detail sections.
The feature uses ActivityRepository through activity ViewModels. New activity metric work should keep metric-specific charts and rows in features/activity and use the shared period scaffold instead of adding a new screen shell.
-
activity-recording.md: GPS/repetition recording before saving to Health Connect. -
activity-training-plans.md: planned workouts and activity setup defaults. -
route-file-import.md: GPX/KML/KMZ route import review. -
fit-files-import.md: FIT activity, course, and workout import from Settings Data Importers. -
offline-maps-support.md: local map packs for route display. -
non-health-connect-metrics-dashboard.md: cardio load and other derived activity context.
Generated from docs/features/activity-metrics.md. Edit it there; changes made here are overwritten.
This wiki mirrors the Markdown in Hale-MTU/OpenVitals on every push to main.
Features
- Features
- Achievements
- Activity And Training Plans
- Activity Metrics
- Apple Health Import
- Beverage Logging And Caffeine
- Bluetooth LE Sensors
- Body Energy
- Body Metrics
- CoMaps Navigation Context
- CSV Import
- Cycle Tracking
- Daily Readiness
- Elevation Correction
- Feature Map
- FIT Files Import
- Food Logging
- GPX/KML/KMZ/TCX Route Import
- Health Connect Metrics Dashboard
- Health Report Export
- Heart And Vitals
- Heart Rate Recovery
- Home Screen Widgets
- Hydration
- Manual Entry Of Metrics
- Medical Records
- Metric Detail Customization
- Mindfulness
- Non Health Connect Metrics Dashboard
- Nutrition
- Offline Maps Support
- Onboarding And Permissions
- Preloaded Beverage Nutrition Reference
- Privacy, Support, And Diagnostics
- Recording Of Activity
- Reminders
- Settings And Preferences
- Sleep Score And Recovery
- Sleep Tracking
- Statistics
- Sync With Another Phone
How-to
App
- App Guide
- FAQ
- Getting Started
- Health Connect
- Install
- Local And Connected Editions
- Permissions
- Privacy
- Screenshots
- Support
Reference
- Design Reference
- Reference
- Design Guidelines for Offline & Sync
- OpenVitals UI Notes
- Reference: Data Capture
- Reference: Data Display
- Reference: Health Connect Matchmaking
- Reference: Health Connect Onboarding
- Reference: Health Connect Permissions
- Reference: Health Connect UX
- Reference: Promoting Health Connect
Engineering
- Code Analysis
- Engineering
- Flutter ↔ Kotlin test-parity matrix
- apple-health-import
- Architecture
- body-cycle-recovery
- Design system conformance
- Development
- Feature Playbook
- Flutter -> Kotlin test parity: domain/data/core/contract/state/navigation/di/bootstrap/l10n/widget_test
- Flutter → Kotlin test-parity matrix: features section
- Flutter → Kotlin test-parity matrix: ui / goldens / integration / fixtures
- Flutter-to-Kotlin test-parity matrix — dashboard + devicesync
- manual-entry
- Translations
Proposals
- Proposals
- Activity Start Flow Analysis
- Activity Start Flow Simplification Proposals
- Caffeine Detail And Future Sleep Insights
- Cycle Tracking: Design and Status
- Medical Records Through Health Connect
- Medical Records: What Is Left
Releases
- OpenVitals 2.16.0
- OpenVitals 2.15.2
- OpenVitals 2.15.1
- OpenVitals 2.15.0
- OpenVitals 2.14.5
- OpenVitals 2.14.4
- OpenVitals 2.14.3
- OpenVitals 2.14.2
- OpenVitals 2.14.1
- OpenVitals 2.14.0
- OpenVitals 2.13.0
- OpenVitals 2.12.0
- OpenVitals 2.11.2
- OpenVitals 2.11.1
- OpenVitals 2.11.0
- OpenVitals 2.10.1
- OpenVitals 2.10.0
- OpenVitals 2.9.1
- OpenVitals 2.9.0
- OpenVitals 2.8.0
- OpenVitals 2.7.3
- OpenVitals 2.7.2
- OpenVitals 2.7.1
- OpenVitals 2.7.0
- OpenVitals 2.6.6
- OpenVitals 2.6.5
- OpenVitals 2.6.4
- OpenVitals 2.6.3
- OpenVitals 2.6.2
- OpenVitals 2.6.1
- OpenVitals 2.6.0
- OpenVitals 2.5.0
- OpenVitals 2.4.1
- OpenVitals 2.4.0
- OpenVitals 2.3.2
- OpenVitals 2.3.1
- OpenVitals 2.3.0
- OpenVitals 2.2.8
- OpenVitals 2.2.7
- OpenVitals 2.2.6
- OpenVitals 2.2.5
- OpenVitals 2.2.4
- OpenVitals 2.2.3
- OpenVitals 2.2.2
- OpenVitals 2.2.1
- OpenVitals 2.2.0
- OpenVitals 2.1.0
- OpenVitals 2.0.4
- OpenVitals 2.0.3
- OpenVitals 2.0.2
- OpenVitals 2.0.1
- OpenVitals 1.9.0
- OpenVitals 1.8.0
- OpenVitals 1.7.7
- OpenVitals 1.7.6
- OpenVitals 1.7.5
- OpenVitals 1.7.4
- OpenVitals 1.7.3
- OpenVitals 1.7.2
- OpenVitals 1.7.1
- OpenVitals 1.7.0
- OpenVitals 1.6.3
- OpenVitals 1.6.2
- OpenVitals 1.6.1
- OpenVitals 1.6.0
- OpenVitals 1.5.1
- OpenVitals 1.5.0
Project