> Documentation index: https://developer.android.com/reference/llms.txt

# HealthData

Artifact: [androidx.glance.wear:wear](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/glance/wear/health/HealthData.kt+class:androidx.glance.wear.health.HealthData) Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)


```
@ExperimentalGlanceWearApi
object HealthData
```

<br />

*** ** * ** ***

A representation of health data managed by Health Services.

This provides access to various health metrics that can be used in Glance Wear Widgets, such as heart rate and daily activity totals.

## Summary

| ### Public properties |
|---|---|
| `RemoteInt` | `HEART_RATE_ACCURACY_HIGH` Heart rate data is available with high accuracy. |
| `RemoteInt` | `HEART_RATE_ACCURACY_LOW` Heart rate data is available but the accuracy is low. |
| `RemoteInt` | `HEART_RATE_ACCURACY_MEDIUM` Heart rate data is available and the accuracy is medium. |
| `RemoteInt` | `HEART_RATE_ACCURACY_NO_CONTACT` Heart rate cannot be acquired because the sensor is not properly contacting skin. |
| `RemoteInt` | `HEART_RATE_ACCURACY_UNKNOWN` Heart rate accuracy is unknown. |
| `RemoteInt` | `HEART_RATE_ACCURACY_UNRELIABLE` Heart rate data is currently too unreliable to be used. |
| `RemoteFloat` | `dailyCalories` The total number of calories burned over a day (including both BMR and active calories), expressed in kilocalories (kcal). |
| `RemoteFloat` | `dailyDistanceMeters` The total distance traveled over a day, expressed in meters. |
| `RemoteFloat` | `dailyFloors` The total number of floors climbed over a day. |
| `RemoteInt` | `dailySteps` The total step count over a day. |
| `RemoteInt` | `heartRateAccuracy` Heart rate sensor accuracy data. |
| `RemoteFloat` | `heartRateBpm` Current heart rate, in beats per minute. |
| `RemoteBoolean` | `isDailyCaloriesAvailable` Returns `true` if `dailyCalories` is available on the host, `false` otherwise. |
| `RemoteBoolean` | `isDailyDistanceMetersAvailable` Returns `true` if `dailyDistanceMeters` is available on the host, `false` otherwise. |
| `RemoteBoolean` | `isDailyFloorsAvailable` Returns `true` if `dailyFloors` is available on the host, `false` otherwise. |
| `RemoteBoolean` | `isDailyStepsAvailable` Returns `true` if `dailySteps` is available on the host, `false` otherwise. |
| `RemoteBoolean` | `isHeartRateBpmAvailable` Returns `true` if `heartRateBpm` is available on the host, `false` otherwise. |

## Public properties

### HEART_RATE_ACCURACY_HIGH

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val HEART_RATE_ACCURACY_HIGH: RemoteInt
```

Heart rate data is available with high accuracy.

### HEART_RATE_ACCURACY_LOW

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val HEART_RATE_ACCURACY_LOW: RemoteInt
```

Heart rate data is available but the accuracy is low.

### HEART_RATE_ACCURACY_MEDIUM

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val HEART_RATE_ACCURACY_MEDIUM: RemoteInt
```

Heart rate data is available and the accuracy is medium.

### HEART_RATE_ACCURACY_NO_CONTACT

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val HEART_RATE_ACCURACY_NO_CONTACT: RemoteInt
```

Heart rate cannot be acquired because the sensor is not properly contacting skin.

### HEART_RATE_ACCURACY_UNKNOWN

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val HEART_RATE_ACCURACY_UNKNOWN: RemoteInt
```

Heart rate accuracy is unknown.

### HEART_RATE_ACCURACY_UNRELIABLE

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val HEART_RATE_ACCURACY_UNRELIABLE: RemoteInt
```

Heart rate data is currently too unreliable to be used.

### dailyCalories

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val dailyCalories: RemoteFloat
```

The total number of calories burned over a day (including both BMR and active calories), expressed in kilocalories (kcal).

It resets when 00:00 is reached in the device's current timezone. This can result in the daily period being greater or less than 24 hours if the timezone is changed.

Check `isDailyCaloriesAvailable` to determine if this metric is available on the host.

Required permission: `Manifest.permission.ACTIVITY_RECOGNITION`

### dailyDistanceMeters

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val dailyDistanceMeters: RemoteFloat
```

The total distance traveled over a day, expressed in meters.

It resets when 00:00 is reached in the device's current timezone. This can result in the daily period being greater or less than 24 hours if the timezone is changed.

Check `isDailyDistanceMetersAvailable` to determine if this metric is available on the host.

Required permission: `Manifest.permission.ACTIVITY_RECOGNITION`

### dailyFloors

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val dailyFloors: RemoteFloat
```

The total number of floors climbed over a day.

It resets when 00:00 is reached in the device's current timezone. This can result in the daily period being greater or less than 24 hours if the timezone is changed.

Check `isDailyFloorsAvailable` to determine if this metric is available on the host.

Required permission: `Manifest.permission.ACTIVITY_RECOGNITION`

### dailySteps

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val dailySteps: RemoteInt
```

The total step count over a day.

It resets when 00:00 is reached in the device's current timezone. This can result in the daily period being greater or less than 24 hours if the timezone is changed.

Check `isDailyStepsAvailable` to determine if this metric is available on the host.

Required permission: `Manifest.permission.ACTIVITY_RECOGNITION`

### heartRateAccuracy

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val heartRateAccuracy: RemoteInt
```

Heart rate sensor accuracy data. The accuracy value is one of `HEART_RATE_ACCURACY_*` constants.

If permission for `heartRateBpm` is not granted, `heartRateAccuracy` will be `HEART_RATE_ACCURACY_UNKNOWN`.

### heartRateBpm

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val heartRateBpm: RemoteFloat
```

Current heart rate, in beats per minute.

Check `isHeartRateBpmAvailable` or `heartRateAccuracy` for more detailed information to determine if this metric is available on the host.

Required permissions are:

- API \< 36: `Manifest.permission.BODY_SENSORS`

- API \>= 36: `HealthPermissions.READ_HEART_RATE`

### isDailyCaloriesAvailable

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val isDailyCaloriesAvailable: RemoteBoolean
```

Returns `true` if `dailyCalories` is available on the host, `false` otherwise.

A health data type may be unavailable if the permission wasn't granted or if the host cannot retrieve it.

If `false`, `dailyCalories` will return its default value.

### isDailyDistanceMetersAvailable

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val isDailyDistanceMetersAvailable: RemoteBoolean
```

Returns `true` if `dailyDistanceMeters` is available on the host, `false` otherwise.

A health data type may be unavailable if the permission wasn't granted or if the host cannot retrieve it.

If `false`, `dailyDistanceMeters` will return its default value.

### isDailyFloorsAvailable

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val isDailyFloorsAvailable: RemoteBoolean
```

Returns `true` if `dailyFloors` is available on the host, `false` otherwise.

A health data type may be unavailable if the permission wasn't granted or if the host cannot retrieve it.

If `false`, `dailyFloors` will return its default value.

### isDailyStepsAvailable

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val isDailyStepsAvailable: RemoteBoolean
```

Returns `true` if `dailySteps` is available on the host, `false` otherwise.

A health data type may be unavailable if the permission wasn't granted or if the host cannot retrieve it.

If `false`, `dailySteps` will return its default value.

### isHeartRateBpmAvailable

Added in [1.0.0-alpha23](https://developer.android.com/jetpack/androidx/releases/glance-wear.md.txt#1.0.0-alpha23)

```
val isHeartRateBpmAvailable: RemoteBoolean
```

Returns `true` if `heartRateBpm` is available on the host, `false` otherwise.

Heart rate availability is determined by the sensor's contact and reliability. It is considered available if `heartRateAccuracy` is `HEART_RATE_ACCURACY_LOW`, `HEART_RATE_ACCURACY_MEDIUM`, or `HEART_RATE_ACCURACY_HIGH`.

A health data type may be unavailable if the permission wasn't granted or if the host cannot retrieve it.

If `false`, `heartRateBpm` will return its default value.