StepsRecord
public final class StepsRecord implements Record
Captures the number of steps taken since the last reading. Each step is only reported once so records shouldn't have overlapping time. The start time of each record should represent the start of the interval in which steps were taken.
The start time must be equal to or greater than the end time of the previous record. Adding all of the values together for a period of time calculates the total number of steps during that period.
Summary
Public fields |
|
|---|---|
static final @NonNull AggregateMetric<@NonNull Long> |
Metric identifier to retrieve the total steps count from |
Public constructors |
|---|
StepsRecord( |
Public methods |
|
|---|---|
boolean |
|
final long |
getCount()Count. |
@NonNull Instant |
End time of the record. |
ZoneOffset |
User experienced zone offset at |
@NonNull Metadata |
Set of common metadata associated with the written record. |
@NonNull Instant |
Start time of the record. |
ZoneOffset |
User experienced zone offset at |
int |
hashCode() |
@NonNull String |
toString() |
Public fields
COUNT_TOTAL
public static final @NonNull AggregateMetric<@NonNull Long> COUNT_TOTAL
Metric identifier to retrieve the total steps count from androidx.health.connect.client.aggregate.AggregationResult.
Public constructors
StepsRecord
public StepsRecord(
@NonNull Instant startTime,
ZoneOffset startZoneOffset,
@NonNull Instant endTime,
ZoneOffset endZoneOffset,
@IntRange(from = 1, to = 1000000) long count,
@NonNull Metadata metadata
)
Public methods
getEndZoneOffset
public ZoneOffset getEndZoneOffset()
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.
getMetadata
public @NonNull Metadata getMetadata()
Set of common metadata associated with the written record.
getStartZoneOffset
public ZoneOffset getStartZoneOffset()
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.