# RestingHeartRateRecord

Artifact: [androidx.health.connect:connect-client](https://developer.android.com/jetpack/androidx/releases/health-connect) [View Source](https://cs.android.com/search?q=file:androidx/health/connect/client/records/RestingHeartRateRecord.kt+class:androidx.health.connect.client.records.RestingHeartRateRecord) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

*** ** * ** ***


```
public final class RestingHeartRateRecord implements Record
```

<br />

*** ** * ** ***

Captures the user's resting heart rate. Each record represents a single instantaneous measurement.

## Summary

| ### Public fields |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregateMetric<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Long.html>` | `https://developer.android.com/reference/androidx/health/connect/client/records/RestingHeartRateRecord#BPM_AVG()` Metric identifier to retrieve the average resting heart rate from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregateMetric<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Long.html>` | `https://developer.android.com/reference/androidx/health/connect/client/records/RestingHeartRateRecord#BPM_MAX()` Metric identifier to retrieve the maximum resting heart rate from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`. |
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregateMetric<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Long.html>` | `https://developer.android.com/reference/androidx/health/connect/client/records/RestingHeartRateRecord#BPM_MIN()` Metric identifier to retrieve the minimum resting heart rate from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/health/connect/client/records/RestingHeartRateRecord#RestingHeartRateRecord(java.time.Instant,java.time.ZoneOffset,kotlin.Long,androidx.health.connect.client.records.metadata.Metadata)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html time, https://developer.android.com/reference/java/time/ZoneOffset.html zoneOffset, long beatsPerMinute, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Metadata metadata )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/connect/client/records/RestingHeartRateRecord#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final long` | `https://developer.android.com/reference/androidx/health/connect/client/records/RestingHeartRateRecord#getBeatsPerMinute()()` Heart beats per minute. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/health/connect/client/records/metadata/Metadata` | `https://developer.android.com/reference/androidx/health/connect/client/records/RestingHeartRateRecord#getMetadata()()` Set of common metadata associated with the written record. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/RestingHeartRateRecord#getTime()()` Time the record happened. |
| `https://developer.android.com/reference/java/time/ZoneOffset.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/RestingHeartRateRecord#getZoneOffset()()` User experienced zone offset at `https://developer.android.com/reference/androidx/health/connect/client/records/InstantaneousRecord#time()`, or null if unknown. |
| `int` | `https://developer.android.com/reference/androidx/health/connect/client/records/RestingHeartRateRecord#hashCode()()` |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/RestingHeartRateRecord#toString()()` |

## Public fields

### BPM_AVG

```
public static final @NonNull AggregateMetric<@NonNull Long> BPM_AVG
```

Metric identifier to retrieve the average resting heart rate from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`.

### BPM_MAX

```
public static final @NonNull AggregateMetric<@NonNull Long> BPM_MAX
```

Metric identifier to retrieve the maximum resting heart rate from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`.

### BPM_MIN

```
public static final @NonNull AggregateMetric<@NonNull Long> BPM_MIN
```

Metric identifier to retrieve the minimum resting heart rate from `https://developer.android.com/reference/androidx/health/connect/client/aggregate/AggregationResult`.

## Public constructors

### RestingHeartRateRecord

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
public RestingHeartRateRecord(
    @NonNull Instant time,
    ZoneOffset zoneOffset,
    long beatsPerMinute,
    @NonNull Metadata metadata
)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getBeatsPerMinute

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
public final long getBeatsPerMinute()
```

Heart beats per minute. Required field. Validation range: 1-300.

### getMetadata

```
public @NonNull Metadata getMetadata()
```

Set of common metadata associated with the written record.

### getTime

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
public @NonNull Instant getTime()
```

Time the record happened.

### getZoneOffset

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

```
public ZoneOffset getZoneOffset()
```

User experienced zone offset at `https://developer.android.com/reference/androidx/health/connect/client/records/InstantaneousRecord#time()`, 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.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```