class SpeedRecord : Record


Captures the user's speed, e.g. during running or cycling. Each record represents a series of measurements.

Summary

Nested types

Represents a single measurement of the speed, a scalar magnitude.

Public companion properties

AggregateMetric<Velocity>

Metric identifier to retrieve average speed from androidx.health.connect.client.aggregate.AggregationResult.

AggregateMetric<Velocity>

Metric identifier to retrieve maximum speed from androidx.health.connect.client.aggregate.AggregationResult.

AggregateMetric<Velocity>

Metric identifier to retrieve minimum speed from androidx.health.connect.client.aggregate.AggregationResult.

Public constructors

SpeedRecord(
    startTime: Instant,
    startZoneOffset: ZoneOffset?,
    endTime: Instant,
    endZoneOffset: ZoneOffset?,
    samples: List<SpeedRecord.Sample>,
    metadata: Metadata
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

open Instant

End time of the record.

open ZoneOffset?

User experienced zone offset at endTime, or null if unknown.

open Metadata

Set of common metadata associated with the written record.

open List<SpeedRecord.Sample>
open Instant

Start time of the record.

open ZoneOffset?

User experienced zone offset at startTime, or null if unknown.

Public companion properties

SPEED_AVG

val SPEED_AVGAggregateMetric<Velocity>

Metric identifier to retrieve average speed from androidx.health.connect.client.aggregate.AggregationResult.

SPEED_MAX

val SPEED_MAXAggregateMetric<Velocity>

Metric identifier to retrieve maximum speed from androidx.health.connect.client.aggregate.AggregationResult.

SPEED_MIN

val SPEED_MINAggregateMetric<Velocity>

Metric identifier to retrieve minimum speed from androidx.health.connect.client.aggregate.AggregationResult.

Public constructors

SpeedRecord

Added in 1.1.0-alpha10
SpeedRecord(
    startTime: Instant,
    startZoneOffset: ZoneOffset?,
    endTime: Instant,
    endZoneOffset: ZoneOffset?,
    samples: List<SpeedRecord.Sample>,
    metadata: Metadata = Metadata.EMPTY
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

endTime

Added in 1.1.0-alpha10
open val endTimeInstant

End time of the record.

endZoneOffset

Added in 1.1.0-alpha10
open val endZoneOffsetZoneOffset?

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.

metadata

Added in 1.1.0-alpha10
open val metadataMetadata

Set of common metadata associated with the written record.

samples

Added in 1.1.0-alpha10
open val samplesList<SpeedRecord.Sample>

startTime

Added in 1.1.0-alpha10
open val startTimeInstant

Start time of the record.

startZoneOffset

Added in 1.1.0-alpha10
open val startZoneOffsetZoneOffset?

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.