# ExerciseSessionRecord

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

*** ** * ** ***


```
class ExerciseSessionRecord : Record
```

<br />

*** ** * ** ***

Captures any exercise a user does. This can be common fitness exercise like running or different sports.

Each record needs a start time and end time. Records don't need to be back-to-back or directly after each other, there can be gaps in between.

Example code demonstrate how to read exercise session:

```kotlin
import androidx.health.connect.client.readRecord
import androidx.health.connect.client.records.ExerciseSessionRecord
import androidx.health.connect.client.records.HeartRateRecord
import androidx.health.connect.client.request.ReadRecordsRequest
import androidx.health.connect.client.time.TimeRangeFilter

val response =
    healthConnectClient.readRecords(
        ReadRecordsRequest<ExerciseSessionRecord>(
            timeRangeFilter = TimeRangeFilter.between(startTime, endTime)
        )
    )
for (exerciseRecord in response.records) {
    // Process each exercise record
    // Optionally pull in with other data sources of the same time range.
    val heartRateRecords =
        healthConnectClient
            .readRecords(
                ReadRecordsRequest<HeartRateRecord>(
                    timeRangeFilter =
                        TimeRangeFilter.between(
                            exerciseRecord.startTime,
                            exerciseRecord.endTime,
                        )
                )
            )
            .records
}
```

## Summary

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_BADMINTON() = 2` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_BASEBALL() = 4` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_BASKETBALL() = 5` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_BIKING() = 8` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_BIKING_STATIONARY() = 9` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_BOOT_CAMP() = 10` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_BOXING() = 11` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_CALISTHENICS() = 13` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_CRICKET() = 14` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_DANCING() = 16` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_ELLIPTICAL() = 25` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_EXERCISE_CLASS() = 26` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_FENCING() = 27` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_FOOTBALL_AMERICAN() = 28` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_FOOTBALL_AUSTRALIAN() = 29` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_FRISBEE_DISC() = 31` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_GOLF() = 32` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_GUIDED_BREATHING() = 33` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_GYMNASTICS() = 34` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_HANDBALL() = 35` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING() = 36` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_HIKING() = 37` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_ICE_HOCKEY() = 38` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_ICE_SKATING() = 39` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_MARTIAL_ARTS() = 44` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_OTHER_WORKOUT() = 0` Can be used to represent any generic workout that does not fall into a specific category. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_PADDLING() = 46` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_PARAGLIDING() = 47` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_PILATES() = 48` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_RACQUETBALL() = 50` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_ROCK_CLIMBING() = 51` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_ROLLER_HOCKEY() = 52` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_ROWING() = 53` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_ROWING_MACHINE() = 54` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_RUGBY() = 55` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_RUNNING() = 56` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_RUNNING_TREADMILL() = 57` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_SAILING() = 58` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_SCUBA_DIVING() = 59` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_SKATING() = 60` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_SKIING() = 61` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_SNOWBOARDING() = 62` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_SNOWSHOEING() = 63` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_SOCCER() = 64` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_SOFTBALL() = 65` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_SQUASH() = 66` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_STAIR_CLIMBING() = 68` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_STAIR_CLIMBING_MACHINE() = 69` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_STRENGTH_TRAINING() = 70` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_STRETCHING() = 71` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_SURFING() = 72` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_SWIMMING_OPEN_WATER() = 73` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_SWIMMING_POOL() = 74` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_TABLE_TENNIS() = 75` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_TENNIS() = 76` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_VOLLEYBALL() = 78` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_WALKING() = 79` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_WATER_POLO() = 80` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_WEIGHTLIFTING() = 81` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_WHEELCHAIR() = 82` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_YOGA() = 83` |

| ### Public companion properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregateMetric<https://developer.android.com/reference/java/time/Duration.html>` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_DURATION_TOTAL()` Metric identifier to retrieve the total exercise time from `https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregationResult`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#ExerciseSessionRecord(java.time.Instant,java.time.ZoneOffset,java.time.Instant,java.time.ZoneOffset,androidx.health.connect.client.records.metadata.Metadata,kotlin.Int,kotlin.String,kotlin.String,kotlin.collections.List,kotlin.collections.List,androidx.health.connect.client.records.ExerciseRoute,kotlin.String,kotlin.Float)( startTime: https://developer.android.com/reference/java/time/Instant.html, startZoneOffset: https://developer.android.com/reference/java/time/ZoneOffset.html?, endTime: https://developer.android.com/reference/java/time/Instant.html, endZoneOffset: https://developer.android.com/reference/java/time/ZoneOffset.html?, metadata: https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Metadata, exerciseType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, title: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, notes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, segments: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment>, laps: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseLap>, exerciseRoute: https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRoute?, plannedExerciseSessionId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?, rateOfPerceivedExertion: @https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 10.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html? )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#toString()()` |

| ### Public properties |
|---|---|
| `open https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#endTime()` End time of the record. |
| `open https://developer.android.com/reference/java/time/ZoneOffset.html?` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#endZoneOffset()` User experienced zone offset at `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/IntervalRecord#endTime()`, or null if unknown. |
| `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRouteResult` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#exerciseRouteResult()` `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRouteResult` of the session. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#exerciseType()` Type of exercise (e.g. walking, swimming). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseLap>` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#laps()` `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseLap`s of the session. |
| `open https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Metadata` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#metadata()` Set of common metadata associated with the written record. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#notes()` Additional notes for the session. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#plannedExerciseSessionId()` |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/FloatRange(from = 0.0, to = 10.0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html?` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#rateOfPerceivedExertion()` Rate of perceived exertion (RPE) for the session. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment>` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#segments()` `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment`s of the session. |
| `open https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#startTime()` Start time of the record. |
| `open https://developer.android.com/reference/java/time/ZoneOffset.html?` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#startZoneOffset()` User experienced zone offset at `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/IntervalRecord#startTime()`, or null if unknown. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#title()` Title of the session. |

## Constants

### EXERCISE_TYPE_BADMINTON

```
const val EXERCISE_TYPE_BADMINTON = 2: Int
```

### EXERCISE_TYPE_BASEBALL

```
const val EXERCISE_TYPE_BASEBALL = 4: Int
```

### EXERCISE_TYPE_BASKETBALL

```
const val EXERCISE_TYPE_BASKETBALL = 5: Int
```

### EXERCISE_TYPE_BIKING

```
const val EXERCISE_TYPE_BIKING = 8: Int
```

### EXERCISE_TYPE_BIKING_STATIONARY

```
const val EXERCISE_TYPE_BIKING_STATIONARY = 9: Int
```

### EXERCISE_TYPE_BOOT_CAMP

```
const val EXERCISE_TYPE_BOOT_CAMP = 10: Int
```

### EXERCISE_TYPE_BOXING

```
const val EXERCISE_TYPE_BOXING = 11: Int
```

### EXERCISE_TYPE_CALISTHENICS

```
const val EXERCISE_TYPE_CALISTHENICS = 13: Int
```

### EXERCISE_TYPE_CRICKET

```
const val EXERCISE_TYPE_CRICKET = 14: Int
```

### EXERCISE_TYPE_DANCING

```
const val EXERCISE_TYPE_DANCING = 16: Int
```

### EXERCISE_TYPE_ELLIPTICAL

```
const val EXERCISE_TYPE_ELLIPTICAL = 25: Int
```

### EXERCISE_TYPE_EXERCISE_CLASS

```
const val EXERCISE_TYPE_EXERCISE_CLASS = 26: Int
```

### EXERCISE_TYPE_FENCING

```
const val EXERCISE_TYPE_FENCING = 27: Int
```

### EXERCISE_TYPE_FOOTBALL_AMERICAN

```
const val EXERCISE_TYPE_FOOTBALL_AMERICAN = 28: Int
```

### EXERCISE_TYPE_FOOTBALL_AUSTRALIAN

```
const val EXERCISE_TYPE_FOOTBALL_AUSTRALIAN = 29: Int
```

### EXERCISE_TYPE_FRISBEE_DISC

```
const val EXERCISE_TYPE_FRISBEE_DISC = 31: Int
```

### EXERCISE_TYPE_GOLF

```
const val EXERCISE_TYPE_GOLF = 32: Int
```

### EXERCISE_TYPE_GUIDED_BREATHING

```
const val EXERCISE_TYPE_GUIDED_BREATHING = 33: Int
```

### EXERCISE_TYPE_GYMNASTICS

```
const val EXERCISE_TYPE_GYMNASTICS = 34: Int
```

### EXERCISE_TYPE_HANDBALL

```
const val EXERCISE_TYPE_HANDBALL = 35: Int
```

### EXERCISE_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING

```
const val EXERCISE_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING = 36: Int
```

### EXERCISE_TYPE_HIKING

```
const val EXERCISE_TYPE_HIKING = 37: Int
```

### EXERCISE_TYPE_ICE_HOCKEY

```
const val EXERCISE_TYPE_ICE_HOCKEY = 38: Int
```

### EXERCISE_TYPE_ICE_SKATING

```
const val EXERCISE_TYPE_ICE_SKATING = 39: Int
```

### EXERCISE_TYPE_MARTIAL_ARTS

```
const val EXERCISE_TYPE_MARTIAL_ARTS = 44: Int
```

### EXERCISE_TYPE_OTHER_WORKOUT

```
const val EXERCISE_TYPE_OTHER_WORKOUT = 0: Int
```

Can be used to represent any generic workout that does not fall into a specific category. Any unknown new value definition will also fall automatically into `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord#EXERCISE_TYPE_OTHER_WORKOUT()`.

Next Id: 84.

### EXERCISE_TYPE_PADDLING

```
const val EXERCISE_TYPE_PADDLING = 46: Int
```

### EXERCISE_TYPE_PARAGLIDING

```
const val EXERCISE_TYPE_PARAGLIDING = 47: Int
```

### EXERCISE_TYPE_PILATES

```
const val EXERCISE_TYPE_PILATES = 48: Int
```

### EXERCISE_TYPE_RACQUETBALL

```
const val EXERCISE_TYPE_RACQUETBALL = 50: Int
```

### EXERCISE_TYPE_ROCK_CLIMBING

```
const val EXERCISE_TYPE_ROCK_CLIMBING = 51: Int
```

### EXERCISE_TYPE_ROLLER_HOCKEY

```
const val EXERCISE_TYPE_ROLLER_HOCKEY = 52: Int
```

### EXERCISE_TYPE_ROWING

```
const val EXERCISE_TYPE_ROWING = 53: Int
```

### EXERCISE_TYPE_ROWING_MACHINE

```
const val EXERCISE_TYPE_ROWING_MACHINE = 54: Int
```

### EXERCISE_TYPE_RUGBY

```
const val EXERCISE_TYPE_RUGBY = 55: Int
```

### EXERCISE_TYPE_RUNNING

```
const val EXERCISE_TYPE_RUNNING = 56: Int
```

### EXERCISE_TYPE_RUNNING_TREADMILL

```
const val EXERCISE_TYPE_RUNNING_TREADMILL = 57: Int
```

### EXERCISE_TYPE_SAILING

```
const val EXERCISE_TYPE_SAILING = 58: Int
```

### EXERCISE_TYPE_SCUBA_DIVING

```
const val EXERCISE_TYPE_SCUBA_DIVING = 59: Int
```

### EXERCISE_TYPE_SKATING

```
const val EXERCISE_TYPE_SKATING = 60: Int
```

### EXERCISE_TYPE_SKIING

```
const val EXERCISE_TYPE_SKIING = 61: Int
```

### EXERCISE_TYPE_SNOWBOARDING

```
const val EXERCISE_TYPE_SNOWBOARDING = 62: Int
```

### EXERCISE_TYPE_SNOWSHOEING

```
const val EXERCISE_TYPE_SNOWSHOEING = 63: Int
```

### EXERCISE_TYPE_SOCCER

```
const val EXERCISE_TYPE_SOCCER = 64: Int
```

### EXERCISE_TYPE_SOFTBALL

```
const val EXERCISE_TYPE_SOFTBALL = 65: Int
```

### EXERCISE_TYPE_SQUASH

```
const val EXERCISE_TYPE_SQUASH = 66: Int
```

### EXERCISE_TYPE_STAIR_CLIMBING

```
const val EXERCISE_TYPE_STAIR_CLIMBING = 68: Int
```

### EXERCISE_TYPE_STAIR_CLIMBING_MACHINE

```
const val EXERCISE_TYPE_STAIR_CLIMBING_MACHINE = 69: Int
```

### EXERCISE_TYPE_STRENGTH_TRAINING

```
const val EXERCISE_TYPE_STRENGTH_TRAINING = 70: Int
```

### EXERCISE_TYPE_STRETCHING

```
const val EXERCISE_TYPE_STRETCHING = 71: Int
```

### EXERCISE_TYPE_SURFING

```
const val EXERCISE_TYPE_SURFING = 72: Int
```

### EXERCISE_TYPE_SWIMMING_OPEN_WATER

```
const val EXERCISE_TYPE_SWIMMING_OPEN_WATER = 73: Int
```

### EXERCISE_TYPE_SWIMMING_POOL

```
const val EXERCISE_TYPE_SWIMMING_POOL = 74: Int
```

### EXERCISE_TYPE_TABLE_TENNIS

```
const val EXERCISE_TYPE_TABLE_TENNIS = 75: Int
```

### EXERCISE_TYPE_TENNIS

```
const val EXERCISE_TYPE_TENNIS = 76: Int
```

### EXERCISE_TYPE_VOLLEYBALL

```
const val EXERCISE_TYPE_VOLLEYBALL = 78: Int
```

### EXERCISE_TYPE_WALKING

```
const val EXERCISE_TYPE_WALKING = 79: Int
```

### EXERCISE_TYPE_WATER_POLO

```
const val EXERCISE_TYPE_WATER_POLO = 80: Int
```

### EXERCISE_TYPE_WEIGHTLIFTING

```
const val EXERCISE_TYPE_WEIGHTLIFTING = 81: Int
```

### EXERCISE_TYPE_WHEELCHAIR

```
const val EXERCISE_TYPE_WHEELCHAIR = 82: Int
```

### EXERCISE_TYPE_YOGA

```
const val EXERCISE_TYPE_YOGA = 83: Int
```

## Public companion properties

### EXERCISE_DURATION_TOTAL

```
val EXERCISE_DURATION_TOTAL: AggregateMetric<Duration>
```

Metric identifier to retrieve the total exercise time from `https://developer.android.com/reference/kotlin/androidx/health/connect/client/aggregate/AggregationResult`.

## Public constructors

### ExerciseSessionRecord

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

```
ExerciseSessionRecord(
    startTime: Instant,
    startZoneOffset: ZoneOffset?,
    endTime: Instant,
    endZoneOffset: ZoneOffset?,
    metadata: Metadata,
    exerciseType: Int,
    title: String? = null,
    notes: String? = null,
    segments: List<ExerciseSegment> = emptyList(),
    laps: List<ExerciseLap> = emptyList(),
    exerciseRoute: ExerciseRoute? = null,
    plannedExerciseSessionId: String? = null,
    rateOfPerceivedExertion: @FloatRange(from = 0.0, to = 10.0) Float? = null
)
```

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### endTime

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

```
open val endTime: Instant
```

End time of the record.

### endZoneOffset

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

```
open val endZoneOffset: ZoneOffset?
```

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

### exerciseRouteResult

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

```
val exerciseRouteResult: ExerciseRouteResult
```

`https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRouteResult` of the session. Location data points of `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseRoute` should be within the parent session, and should be before the end time of the session.

### exerciseType

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

```
val exerciseType: Int
```

Type of exercise (e.g. walking, swimming). Required field.

Value is one of the following:

- `2`
- `4`
- `5`
- `8`
- `9`
- `10`
- `11`
- `13`
- `14`
- `16`
- `25`
- `26`
- `27`
- `28`
- `29`
- `31`
- `32`
- `33`
- `34`
- `35`
- `36`
- `37`
- `38`
- `39`
- `44`
- `46`
- `47`
- `48`
- `50`
- `51`
- `52`
- `53`
- `54`
- `55`
- `56`
- `57`
- `58`
- `59`
- `60`
- `61`
- `62`
- `63`
- `64`
- `65`
- `66`
- `68`
- `69`
- `70`
- `71`
- `72`
- `73`
- `74`
- `75`
- `76`
- `78`
- `79`
- `80`
- `81`
- `82`
- `0`
- `83`

<br />

### laps

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

```
val laps: List<ExerciseLap>
```

`https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseLap`s of the session. Optional field. Time in laps should be within the parent session, and should not overlap with each other.

### metadata

```
open val metadata: Metadata
```

Set of common metadata associated with the written record.

### notes

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

```
val notes: String?
```

Additional notes for the session. Optional field.

### plannedExerciseSessionId

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

```
val plannedExerciseSessionId: String?
```

### rateOfPerceivedExertion

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

```
val rateOfPerceivedExertion: @FloatRange(from = 0.0, to = 10.0) Float?
```

Rate of perceived exertion (RPE) for the session. Must be between 0 and 10.

See `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#rateOfPerceivedExertion()`

### segments

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

```
val segments: List<ExerciseSegment>
```

`https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment`s of the session. Optional field. Time in segments should be within the parent session, and should not overlap with each other.

### startTime

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

```
open val startTime: Instant
```

Start time of the record.

### startZoneOffset

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

```
open val startZoneOffset: ZoneOffset?
```

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

### title

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

```
val title: String?
```

Title of the session. Optional field.