SpeedRecord: Health Connect speed data
Read from Google’s documentation on 2026-10-03 · Google’s reference page last updated 2026-06-24
SpeedRecord is Health Connect's speed record — a Series record in Google's Activity category. Its read permission is android.permission.health.READ_SPEED; its write permission is android.permission.health.WRITE_SPEED. It supports 3 aggregate metrics (SPEED_AVG, SPEED_MAX and SPEED_MIN). Mandatory fields per Google's table: endTime, metadata, samples and startTime.
What Google says SpeedRecord is
Captures the user's speed, e.g. during running or cycling. Each record represents a series of measurements.
Quoted from Google’s SpeedRecord Jetpack reference, last updated 2026-06-24, read 2026-10-03.
- Class
androidx.health.connect.client.records.SpeedRecord- Google's category
- Activity
- Record type
- Series
- Unit class
- none named in Google's table
- Mandatory fields
endTimemetadatasamplesstartTime- Added in (Jetpack)
1.1.0
Permissions
The exact strings Google’s data-types table declares for SpeedRecord. Google’s page: “Before requesting any permissions, your app must declare them in the manifest.”
| Access | Permission string | Framework reference |
|---|---|---|
| Read | android.permission.health.READ_SPEED | API 34 · U Ext 7 |
| Write | android.permission.health.WRITE_SPEED | API 34 · U Ext 7 |
<uses-permission android:name="android.permission.health.READ_SPEED" />
<uses-permission android:name="android.permission.health.WRITE_SPEED" />import androidx.health.connect.client.permission.HealthPermission
import androidx.health.connect.client.records.SpeedRecord
val permissions = setOf(
HealthPermission.getReadPermission(SpeedRecord::class),
HealthPermission.getWritePermission(SpeedRecord::class),
)The 6 fields of SpeedRecord
Types and descriptions as Google’s reference prints them. The range column quotes Google’s own range annotation or sentence; a dash means Google states none, which is not the same as no validation.
| Field | Type | Allowed range | Google’s description |
|---|---|---|---|
endTimemandatory | Instant | — | End time of the record. |
endZoneOffset | ZoneOffset? | — | User experienced zone offset at endTime, or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent. |
metadatamandatory | Metadata | — | Set of common metadata associated with the written record. |
samplesmandatory | List<SpeedRecord.Sample> | — | Google gives no description. |
startTimemandatory | Instant | — | Start time of the record. |
startZoneOffset | ZoneOffset? | — | User experienced zone offset at startTime, or null if unknown. Providing these will help history aggregations results stay consistent should user travel. Queries with user experienced time filters will assume system current zone offset if the information is absent. |
Nested types
SpeedRecord.Sample— Represents a single measurement of the speed, a scalar magnitude.
Aggregate metrics
The AggregateMetric constants Google defines on SpeedRecord. The value type is the T in Google’s AggregateMetric<T> signature. Every aggregate metric across all records.
| Metric | Value type | Google’s description |
|---|---|---|
| SpeedRecord.SPEED_AVG | Velocity | Metric identifier to retrieve average speed from androidx.health.connect.client.aggregate.AggregationResult. |
| SpeedRecord.SPEED_MAX | Velocity | Metric identifier to retrieve maximum speed from androidx.health.connect.client.aggregate.AggregationResult. |
| SpeedRecord.SPEED_MIN | Velocity | Metric identifier to retrieve minimum speed from androidx.health.connect.client.aggregate.AggregationResult. |
Google’s read-data guide: “For cumulative types like StepsRecord, use aggregate() instead of readRecords() to avoid double counting from multiple sources and improve accuracy.” and “The aggregation API also contains logic to handle duplicate records, and lessens the chances of rate limiting.”
Read SpeedRecord in Kotlin
The shape of Google’s own read example, with SpeedRecord and its names filled in. Get the client with HealthConnectClient.getOrCreate(context) after checking getSdkStatus.
import androidx.health.connect.client.HealthConnectClient
import androidx.health.connect.client.records.SpeedRecord
import androidx.health.connect.client.request.ReadRecordsRequest
import androidx.health.connect.client.time.TimeRangeFilter
import java.time.Instant
suspend fun readSpeed(
client: HealthConnectClient,
startTime: Instant,
endTime: Instant,
): List<SpeedRecord> {
val response = client.readRecords(
ReadRecordsRequest(
SpeedRecord::class,
timeRangeFilter = TimeRangeFilter.between(startTime, endTime),
)
)
// One page of up to pageSize records (default 1000); follow
// response.pageToken for the rest.
return response.records
}import androidx.health.connect.client.HealthConnectClient
import androidx.health.connect.client.records.SpeedRecord
import androidx.health.connect.client.request.AggregateRequest
import androidx.health.connect.client.time.TimeRangeFilter
import java.time.Instant
import androidx.health.connect.client.units.Velocity
suspend fun aggregateSpeed(
client: HealthConnectClient,
startTime: Instant,
endTime: Instant,
): Velocity? {
val response = client.aggregate(
AggregateRequest(
metrics = setOf(SpeedRecord.SPEED_AVG),
timeRangeFilter = TimeRangeFilter.between(startTime, endTime),
)
)
// get() is declared as returning a nullable value.
return response[SpeedRecord.SPEED_AVG]
}Setting up the client, the permission flow and Play Console declaration: integrating Health Connect step by step.
HealthKit counterpart
No verified HealthKit counterpart. The cross-platform matrix only pairs metrics checked against both Apple’s and Google’s documentation, and SpeedRecord is not among them yet. A similarly named Apple type may exist on the HealthKit reference, but a name match is not a verified mapping.
The metric on other platforms
These guides list SpeedRecord beside the types on the other platforms this site covers whose own descriptions name the same metric, each quoted, with how each one is read.
Questions
- What permission does SpeedRecord need?
- Google's Health Connect data-types table (read 2026-10-03) declares android.permission.health.READ_SPEED for reading SpeedRecord and android.permission.health.WRITE_SPEED for writing it, and says apps must declare permissions in the manifest before requesting them.
- Which aggregate metrics does SpeedRecord support?
- Google's Jetpack reference defines 3 on SpeedRecord: SPEED_AVG (AggregateMetric<Velocity>), SPEED_MAX (AggregateMetric<Velocity>) and SPEED_MIN (AggregateMetric<Velocity>). Pass them in the metrics set of an AggregateRequest and read each back from the AggregationResult.
- Is SpeedRecord an interval, instantaneous or series record?
- Google's data-types table lists SpeedRecord as Series, and defines that column as indicating "whether the data is recorded at an instant in time or over an interval". Its mandatory fields are endTime, metadata, samples and startTime.
Other Activity records
Sources checked
- Google — SpeedRecord (Jetpack reference) — last updated 2026-06-24 · read 2026-10-03
- Google — Health Connect data types · read 2026-10-03
- Google — HealthPermissions (framework reference) · read 2026-10-03
- Google — Read raw data (Health Connect guide) · read 2026-10-03
Google’s descriptions are quoted for identification; the page layout, the capsule and the cross-platform pairing are AIFitnessAPI’s. Generated from Google’s pages by a script, not typed by hand — the same data is behind every page in the Health Connect reference.