HeartRateRecord

public final class HeartRateRecord
extends IntervalRecord

java.lang.Object
   ↳ android.health.connect.datatypes.Record
     ↳ android.health.connect.datatypes.IntervalRecord
       ↳ android.health.connect.datatypes.HeartRateRecord


Captures the user's heart rate. Each record represents a series of measurements.

Summary

Nested classes

class HeartRateRecord.Builder

Builder class for HeartRateRecord 

class HeartRateRecord.HeartRateSample

A class to represent heart rate samples 

Fields

public static final AggregationType<Long> BPM_AVG

Metric identifier to get avg heart rate using aggregate APIs in HealthConnectManager

public static final AggregationType<Long> BPM_MAX

Metric identifier to get max heart rate in beats per minute using aggregate APIs in HealthConnectManager

public static final AggregationType<Long> BPM_MIN

Metric identifier to get min heart rate in beats per minute using aggregate APIs in HealthConnectManager

public static final AggregationType<Long> HEART_MEASUREMENTS_COUNT

Metric identifier to retrieve the number of heart rate measurements using aggregate APIs in HealthConnectManager

Public methods

boolean equals(Object object)

Indicates whether some other object is "equal to" this one.

List<HeartRateRecord.HeartRateSample> getSamples()
int hashCode()

Returns a hash code value for the object.

Inherited methods

Fields

BPM_AVG

Added in API level 34
public static final AggregationType<Long> BPM_AVG

Metric identifier to get avg heart rate using aggregate APIs in HealthConnectManager

BPM_MAX

Added in API level 34
public static final AggregationType<Long> BPM_MAX

Metric identifier to get max heart rate in beats per minute using aggregate APIs in HealthConnectManager

BPM_MIN

Added in API level 34
public static final AggregationType<Long> BPM_MIN

Metric identifier to get min heart rate in beats per minute using aggregate APIs in HealthConnectManager

HEART_MEASUREMENTS_COUNT

Added in API level 34
public static final AggregationType<Long> HEART_MEASUREMENTS_COUNT

Metric identifier to retrieve the number of heart rate measurements using aggregate APIs in HealthConnectManager

Public methods

equals

Added in API level 34
public boolean equals (Object object)

Indicates whether some other object is "equal to" this one.

Parameters
object Object: the reference object with which to compare. This value may be null.

Returns
boolean true if this object is the same as the obj

getSamples

Added in API level 34
public List<HeartRateRecord.HeartRateSample> getSamples ()

Returns
List<HeartRateRecord.HeartRateSample> heart rate samples corresponding to this record This value cannot be null.

hashCode

Added in API level 34
public int hashCode ()

Returns a hash code value for the object.

Returns
int a hash code value for this object.