# HealthConnectFeatures

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/HealthConnectFeatures.kt+class:androidx.health.connect.client.HealthConnectFeatures) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/health-connect#1.1.0)

*** ** * ** ***


```
interface HealthConnectFeatures
```

<br />

*** ** * ** ***

Interface for checking availability of features in `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectClient`.

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_ACTIVITY_INTENSITY() = 7` Feature constant for Activity Intensity APIs. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_EXERCISE_SESSION_IMPROVEMENTS() = 9` Feature constant for exercise session improvements. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_EXTENDED_DEVICE_TYPES() = 8` Feature constant for extended device types. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/health/connect/client/ExperimentalMatchmakingApi https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_MATCHMAKING() = 10` Feature constant for Matchmaking APIs. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_MINDFULNESS_SESSION() = 5` Feature constant for mindfulness session. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/health/connect/client/feature/ExperimentalPersonalHealthRecordApi https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_PERSONAL_HEALTH_RECORD() = 6` Feature constant for Personal Health Records APIs. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_PLANNED_EXERCISE() = 3` Feature constant for planned exercise sessions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_READ_HEALTH_DATA_HISTORY() = 4` Feature constant for reading health data history. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_READ_HEALTH_DATA_IN_BACKGROUND() = 1` Feature constant for reading health data in background. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_SKIN_TEMPERATURE() = 2` Feature constant for skin temperature. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_STATUS_AVAILABLE() = 2` Indicates that a feature is available and the corresponding APIs can be used at runtime. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_STATUS_UNAVAILABLE() = 1` Indicates that a feature is unavailable and the corresponding APIs cannot be used at runtime. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#getFeatureStatus(kotlin.Int)(feature: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Checks whether the given feature is available. |

## Constants

### FEATURE_ACTIVITY_INTENSITY

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

```
const val FEATURE_ACTIVITY_INTENSITY = 7: Int
```

Feature constant for Activity Intensity APIs.

### FEATURE_EXERCISE_SESSION_IMPROVEMENTS

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

```
const val FEATURE_EXERCISE_SESSION_IMPROVEMENTS = 9: Int
```

Feature constant for exercise session improvements.

When this feature is available, the following fields are supported:

- `ExerciseSessionRecord.rateOfPerceivedExertion`

- `ExerciseSegment.weight`

- `ExerciseSegment.setIndex`

- `ExerciseSegment.rateOfPerceivedExertion`

### FEATURE_EXTENDED_DEVICE_TYPES

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

```
const val FEATURE_EXTENDED_DEVICE_TYPES = 8: Int
```

Feature constant for extended device types.

When this feature is available, the following device types are supported:

- `Device.TYPE_CONSUMER_MEDICAL_DEVICE`

- `Device.TYPE_GLASSES`

- `Device.TYPE_HEARABLE`

- `Device.TYPE_FITNESS_MACHINE`

- `Device.TYPE_FITNESS_EQUIPMENT`

- `Device.TYPE_PORTABLE_COMPUTER`

- `Device.TYPE_METER`

If this feature is not available, these device types will be treated as `Device.TYPE_UNKNOWN`.

### FEATURE_MATCHMAKING

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

```
@ExperimentalMatchmakingApi
const val FEATURE_MATCHMAKING = 10: Int
```

Feature constant for Matchmaking APIs.

### FEATURE_MINDFULNESS_SESSION

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

```
const val FEATURE_MINDFULNESS_SESSION = 5: Int
```

Feature constant for mindfulness session.

### FEATURE_PERSONAL_HEALTH_RECORD

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

```
@ExperimentalPersonalHealthRecordApi
const val FEATURE_PERSONAL_HEALTH_RECORD = 6: Int
```

Feature constant for Personal Health Records APIs.

### FEATURE_PLANNED_EXERCISE

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

```
const val FEATURE_PLANNED_EXERCISE = 3: Int
```

Feature constant for planned exercise sessions.

### FEATURE_READ_HEALTH_DATA_HISTORY

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

```
const val FEATURE_READ_HEALTH_DATA_HISTORY = 4: Int
```

Feature constant for reading health data history.

### FEATURE_READ_HEALTH_DATA_IN_BACKGROUND

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

```
const val FEATURE_READ_HEALTH_DATA_IN_BACKGROUND = 1: Int
```

Feature constant for reading health data in background.

### FEATURE_SKIN_TEMPERATURE

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

```
const val FEATURE_SKIN_TEMPERATURE = 2: Int
```

Feature constant for skin temperature.

### FEATURE_STATUS_AVAILABLE

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

```
const val FEATURE_STATUS_AVAILABLE = 2: Int
```

Indicates that a feature is available and the corresponding APIs can be used at runtime.

### FEATURE_STATUS_UNAVAILABLE

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

```
const val FEATURE_STATUS_UNAVAILABLE = 1: Int
```

Indicates that a feature is unavailable and the corresponding APIs cannot be used at runtime.

## Public functions

### getFeatureStatus

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

```
fun getFeatureStatus(feature: Int): Int
```

Checks whether the given feature is available.

Value is one of the following:

- `1`
- `2`

<br />

| Parameters |
|---|---|
| `feature: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the feature to be checked. One of the "FEATURE_" constants in this class. Value is one of the following: - `1` - `2` - `3` - `4` - `6` - `5` - `7` - `8` - `9` - `10` <br /> |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | one of `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_STATUS_UNAVAILABLE()` or `https://developer.android.com/reference/kotlin/androidx/health/connect/client/HealthConnectFeatures#FEATURE_STATUS_AVAILABLE()` |