# PlatformHealthSources.Keys

Artifact: [androidx.wear.protolayout:protolayout-expression](https://developer.android.com/jetpack/androidx/releases/wear-protolayout) [View Source](https://cs.android.com/search?q=file:androidx/wear/protolayout/expression/PlatformHealthSources.java+class:androidx.wear.protolayout.expression.PlatformHealthSources.Keys) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-protolayout#1.0.0)

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/androidx/wear/protolayout/expression/PlatformHealthSources.Keys "View this page in Java")


```
class PlatformHealthSources.Keys
```

<br />

*** ** * ** ***

Data sources keys for platform health sources.

## Summary

| ### Constants |
|---|---|
| `const https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/PlatformDataKey<https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat!>` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission(value = https://developer.android.com/reference/android/Manifest.permission.html#ACTIVITY_RECOGNITION) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/PlatformHealthSources.Keys#DAILY_CALORIES()` The data source key for daily calories (kcal) data from platform health sources. |
| `const https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/PlatformDataKey<https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat!>` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission(value = https://developer.android.com/reference/android/Manifest.permission.html#ACTIVITY_RECOGNITION) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/PlatformHealthSources.Keys#DAILY_DISTANCE_METERS()` The data source key for daily distance data (in meters) from platform health sources. |
| `const https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/PlatformDataKey<https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat!>` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission(value = https://developer.android.com/reference/android/Manifest.permission.html#ACTIVITY_RECOGNITION) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/PlatformHealthSources.Keys#DAILY_FLOORS()` The data source key for daily floors data from platform health sources. |
| `const https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/PlatformDataKey<https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicInt32!>` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission(value = https://developer.android.com/reference/android/Manifest.permission.html#ACTIVITY_RECOGNITION) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/PlatformHealthSources.Keys#DAILY_STEPS()` The data source key for daily step count data from platform health sources. |
| `const https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/PlatformDataKey<https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/PlatformHealthSources.DynamicHeartRateAccuracy!>` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission(anyOf = [https://developer.android.com/reference/android/Manifest.permission.html#BODY_SENSORS, https://developer.android.com/reference/android/health/connect/HealthPermissions.html#READ_HEART_RATE]) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/PlatformHealthSources.Keys#HEART_RATE_ACCURACY()` The data source key for heart rate sensor accuracy data from platform health sources. |
| `const https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/PlatformDataKey<https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/DynamicBuilders.DynamicFloat!>` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresPermission(anyOf = [https://developer.android.com/reference/android/Manifest.permission.html#BODY_SENSORS, https://developer.android.com/reference/android/health/connect/HealthPermissions.html#READ_HEART_RATE]) https://developer.android.com/reference/kotlin/androidx/wear/protolayout/expression/PlatformHealthSources.Keys#HEART_RATE_BPM()` The data source key for heart rate bpm data from platform health sources. |

## Constants

### DAILY_CALORIES

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

```
@RequiresPermission(value = Manifest.permission.ACTIVITY_RECOGNITION)
const val DAILY_CALORIES: PlatformDataKey<DynamicBuilders.DynamicFloat!>
```

The data source key for daily calories (kcal) data from platform health sources. This is the total number of kilocalories over a day (including both BMR and active calories) and it resets when 00:00 is reached (in whatever is the timezone set at that time). This can result in the DAILY period being greater than or less than 24 hours when the timezone of the device is changed.

### DAILY_DISTANCE_METERS

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

```
@RequiresPermission(value = Manifest.permission.ACTIVITY_RECOGNITION)
const val DAILY_DISTANCE_METERS: PlatformDataKey<DynamicBuilders.DynamicFloat!>
```

The data source key for daily distance data (in meters) from platform health sources. This is the total distance over a day and it resets when 00:00 is reached (in whatever is the timezone set at that time). This can result in the DAILY period being greater than or less than 24 hours when the timezone of the device is changed.

### DAILY_FLOORS

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

```
@RequiresPermission(value = Manifest.permission.ACTIVITY_RECOGNITION)
const val DAILY_FLOORS: PlatformDataKey<DynamicBuilders.DynamicFloat!>
```

The data source key for daily floors data from platform health sources. This is the total number of floors climbed over a day and it resets when 00:00 is reached (in whatever is the timezone set at that time). This can result in the DAILY period being greater than or less than 24 hours when the timezone of the device is changed.

### DAILY_STEPS

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

```
@RequiresPermission(value = Manifest.permission.ACTIVITY_RECOGNITION)
const val DAILY_STEPS: PlatformDataKey<DynamicBuilders.DynamicInt32!>
```

The data source key for daily step count data from platform health sources. This is the total step count over a day and it resets when 00:00 is reached (in whatever is the timezone set at that time). This can result in the DAILY period being greater than or less than 24 hours when the timezone of the device is changed.

### HEART_RATE_ACCURACY

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

```
@RequiresPermission(anyOf = [Manifest.permission.BODY_SENSORS, HealthPermissions.READ_HEART_RATE])
const val HEART_RATE_ACCURACY: PlatformDataKey<PlatformHealthSources.DynamicHeartRateAccuracy!>
```

The data source key for heart rate sensor accuracy data from platform health sources. The accuracy value is one of `HEART_RATE_ACCURACY_*` constants.

Requirements:

- API \<36: `https://developer.android.com/reference/android/Manifest.permission.html#BODY_SENSORS`
- API \>= 36: `https://developer.android.com/reference/android/health/connect/HealthPermissions.html#READ_HEART_RATE`

### HEART_RATE_BPM

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

```
@RequiresPermission(anyOf = [Manifest.permission.BODY_SENSORS, HealthPermissions.READ_HEART_RATE])
const val HEART_RATE_BPM: PlatformDataKey<DynamicBuilders.DynamicFloat!>
```

The data source key for heart rate bpm data from platform health sources.

Requirements:

- API \<36: `https://developer.android.com/reference/android/Manifest.permission.html#BODY_SENSORS`
- API \>= 36: `https://developer.android.com/reference/android/health/connect/HealthPermissions.html#READ_HEART_RATE`