PowerRecord
public final class PowerRecord implements Record
Captures the power generated by the user, e.g. during cycling or rowing with a power meter. Each record represents a series of measurements.
Summary
Nested types |
|---|
public final class PowerRecord.SampleRepresents a single measurement of power. |
Public fields |
|
|---|---|
static final @NonNull AggregateMetric<@NonNull Power> |
Metric identifier to retrieve average power from |
static final @NonNull AggregateMetric<@NonNull Power> |
Metric identifier to retrieve maximum power from |
static final @NonNull AggregateMetric<@NonNull Power> |
Metric identifier to retrieve minimum power from |
Public constructors |
|---|
PowerRecord( |
Public methods |
|
|---|---|
boolean |
|
@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 List<@NonNull PowerRecord.Sample> |
|
@NonNull Instant |
Start time of the record. |
ZoneOffset |
User experienced zone offset at |
int |
hashCode() |
@NonNull String |
toString() |
Public fields
POWER_AVG
public static final @NonNull AggregateMetric<@NonNull Power> POWER_AVG
Metric identifier to retrieve average power from androidx.health.connect.client.aggregate.AggregationResult.
POWER_MAX
public static final @NonNull AggregateMetric<@NonNull Power> POWER_MAX
Metric identifier to retrieve maximum power from androidx.health.connect.client.aggregate.AggregationResult.
POWER_MIN
public static final @NonNull AggregateMetric<@NonNull Power> POWER_MIN
Metric identifier to retrieve minimum power from androidx.health.connect.client.aggregate.AggregationResult.
Public constructors
PowerRecord
public PowerRecord(
@NonNull Instant startTime,
ZoneOffset startZoneOffset,
@NonNull Instant endTime,
ZoneOffset endZoneOffset,
@NonNull List<@NonNull PowerRecord.Sample> samples,
@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.