Daily Walking Summary
One day's SmartWalking totals, rolled up from the month returned by com.advantahealth.api.activities.Activities.get.
The monthly fetch already carries a per-day breakdown; this is that breakdown reduced to one row per day, so week and month charts, streaks and daily averages can be drawn without re-deriving them from AFActivitiesSummary.activities. It adds no network call — every value comes from the same response.
A member can sync several times a day, and the backend reports each sync window separately. Those windows are summed here (steps, calories, distance, activeMinutes), while distanceUnit, durationUnit, lastSync and deviceType are taken from the most recent window that reported one.
Days with no SmartWalking entry are absent from the list, rather than present with zeros — a day the member never synced is not a day they walked zero steps. Fill the gaps yourself when a chart needs a bar per day.
Kotlin — a week of bars and the daily average
val summary = AFCore.activities().get(month = 8, year = 2026)
val byDate = summary.dailyWalking.associateBy { it.date }
val week = (0..6).map { offset ->
val day = today.minus(6 - offset, DateTimeUnit.DAY)
byDate[day]?.steps ?: 0 // absent day renders as an empty bar
}
val averageOnDaysWalked = summary.dailyWalking.map { it.steps }.average()Swift — the same read
let summary = try await AFCore.shared.activities().get(month: 8, year: 2026)
let byDate = Dictionary(uniqueKeysWithValues: summary.dailyWalking.map { ($0.date, $0) })
let averageOnDaysWalked = summary.dailyWalking.map { Int($0.steps) }.reduce(0, +)
/ max(summary.dailyWalking.count, 1)Properties
Active minutes that day, summed across sync windows and normalized to minutes.
The health platform the day's steps came from, or null when the backend reported none or an unrecognized one.
Unit distance is expressed in as the backend named it (e.g. "Miles", "Meters"), or null when it reported none.
Unit of the raw duration the backend reported (e.g. "Minutes"), or null when it reported none. activeMinutes is already normalized; this is for labelling the backend's own figure.