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.BuilderBuilder class for  | 
| 
        
        
        
        
        class | HeartRateRecord.HeartRateSampleA class to represent heart rate samples | 
| Fields | |
|---|---|
| 
    public
    static
    final
    AggregationType<Long> | BPM_AVGMetric identifier to get avg heart rate using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Long> | BPM_MAXMetric identifier to get max heart rate in beats per minute using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Long> | BPM_MINMetric identifier to get min heart rate in beats per minute using aggregate APIs in  | 
| 
    public
    static
    final
    AggregationType<Long> | HEART_MEASUREMENTS_COUNTMetric identifier to retrieve the number of heart rate measurements using aggregate APIs in
  | 
| 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
public static final AggregationType<Long> BPM_AVG
Metric identifier to get avg heart rate using aggregate APIs in HealthConnectManager
BPM_MAX
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
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
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
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 benull. | 
| Returns | |
|---|---|
| boolean | trueif this object is the same as the obj | 
getSamples
public List<HeartRateRecord.HeartRateSample> getSamples ()
| Returns | |
|---|---|
| List<HeartRateRecord.HeartRateSample> | heart rate samples corresponding to this record, in ascending time order
 This value cannot be null. | 
hashCode
public int hashCode ()
Returns a hash code value for the object.
| Returns | |
|---|---|
| int | a hash code value for this object. | 
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
