# ExerciseSegment

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

*** ** * ** ***


```
class ExerciseSegment
```

<br />

*** ** * ** ***

Represents particular exercise within an exercise session.

Each segment contains start and end time of the exercise, exercise type and optional metrics
such as number of repetitions, weight used, set index, and rate of perceived exertion.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord` |   |

## 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/ExerciseSegment#EXERCISE_SEGMENT_TYPE_ARM_CURL() = 1` Use this type for arm curls. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_BACK_EXTENSION() = 2` Use this type for back extensions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_BALL_SLAM() = 3` Use this type for ball slams. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_BARBELL_SHOULDER_PRESS() = 4` Use this type for barbel shoulder press. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_BENCH_PRESS() = 5` Use this type for bench presses. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_BENCH_SIT_UP() = 6` Use this type for bench sit up. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_BIKING() = 7` Use this type for biking. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_BIKING_STATIONARY() = 8` Use this type for stationary biking. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_BURPEE() = 9` Use this type for burpees. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_CRUNCH() = 10` Use this type for crunches. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_DEADLIFT() = 11` Use this type for deadlifts. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_DOUBLE_ARM_TRICEPS_EXTENSION() = 12` Use this type for double arms triceps extensions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_LEFT_ARM() = 13` Use this type for left arm dumbbell curl. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_RIGHT_ARM() = 14` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_DUMBBELL_FRONT_RAISE() = 15` Use this type for right arm dumbbell curl. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_DUMBBELL_LATERAL_RAISE() = 16` Use this type for dumbbell lateral raises. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_DUMBBELL_ROW() = 17` Use this type for dumbbells rows. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_LEFT_ARM() = 18` Use this type for left arm triceps extensions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_RIGHT_ARM() = 19` Use this type for right arm triceps extensions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_TWO_ARM() = 20` Use this type for two arms triceps extensions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_ELLIPTICAL() = 21` Use this type for elliptical workout. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_FORWARD_TWIST() = 22` Use this type for forward twists. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_FRONT_RAISE() = 23` Use this type for front raises. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING() = 24` Use this type for high intensity training. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_HIP_THRUST() = 25` Use this type for hip thrusts. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_HULA_HOOP() = 26` Use this type for hula-hoops. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_JUMPING_JACK() = 27` Use this type for jumping jacks. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_JUMP_ROPE() = 28` Use this type for jump rope. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_KETTLEBELL_SWING() = 29` Use this type for kettlebell swings. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_LATERAL_RAISE() = 30` Use this type for lateral raises. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_LAT_PULL_DOWN() = 31` Use this type for lat pull-downs. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_LEG_CURL() = 32` Use this type for leg curls. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_LEG_EXTENSION() = 33` Use this type for leg extensions. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_LEG_PRESS() = 34` Use this type for leg presses. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_LEG_RAISE() = 35` Use this type for leg raises. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_LUNGE() = 36` Use this type for lunges. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_MOUNTAIN_CLIMBER() = 37` Use this type for mountain climber. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_OTHER_WORKOUT() = 38` Use this type for other workout. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_PAUSE() = 39` Use this type for the pause. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_PILATES() = 40` Use this type for pilates. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_PLANK() = 41` Use this type for plank. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_PULL_UP() = 42` Use this type for pull-ups. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_PUNCH() = 43` Use this type for punches. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_REST() = 44` Use this type for the rest. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_ROWING_MACHINE() = 45` Use this type for rowing machine workout. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_RUNNING() = 46` Use this type for running. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_RUNNING_TREADMILL() = 47` Use this type for treadmill running. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_SHOULDER_PRESS() = 48` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_SINGLE_ARM_TRICEPS_EXTENSION() = 49` Use this type for shoulder press. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_SIT_UP() = 50` Use this type for sit-ups. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_SQUAT() = 51` Use this type for squats. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING() = 52` Use this type for stair climbing. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING_MACHINE() = 53` Use this type for stair climbing machine. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_STRETCHING() = 54` Use this type for stretching. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_SWIMMING_BACKSTROKE() = 55` Use this type for backstroke swimming. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_SWIMMING_BREASTSTROKE() = 56` Use this type for breaststroke swimming. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_SWIMMING_BUTTERFLY() = 57` Use this type for butterfly swimming. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_SWIMMING_FREESTYLE() = 58` |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_SWIMMING_MIXED() = 59` Use this type for mixed swimming. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_SWIMMING_OPEN_WATER() = 60` Use this type for swimming in open water. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_SWIMMING_OTHER() = 61` Use this type if other swimming styles are not suitable. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_SWIMMING_POOL() = 62` Use this type for swimming in the pool. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_UNKNOWN() = 0` Use this type if the type of the exercise segment is not known. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_UPPER_TWIST() = 63` Use this type for upper twists. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_WALKING() = 64` Use this type for walking. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_WEIGHTLIFTING() = 65` Use this type for weightlifting. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_WHEELCHAIR() = 66` Use this type for wheelchair. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#EXERCISE_SEGMENT_TYPE_YOGA() = 67` Use this type for yoga. |

| ### Public companion functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#isSegmentTypeCompatibleWithSessionType(kotlin.Int,kotlin.Int)( segmentType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, sessionType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` Is a segment type compatible with a session type. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#ExerciseSegment(java.time.Instant,java.time.Instant,kotlin.Int,kotlin.Int,androidx.health.connect.client.units.Mass,kotlin.Int,kotlin.Float)( startTime: https://developer.android.com/reference/java/time/Instant.html, endTime: https://developer.android.com/reference/java/time/Instant.html, segmentType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, repetitions: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, weight: https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Mass?, setIndex: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/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/ExerciseSegment#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/ExerciseSegment#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#toString()()` |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#endTime()` |
| `@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/ExerciseSegment#rateOfPerceivedExertion()` Rate of perceived exertion (RPE) for the segment. |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#repetitions()` Number of repetitions in the segment. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#segmentType()` Type of segment (e.g. biking, plank). |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html?` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#setIndex()` Index of the set in the session. |
| `https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#startTime()` |
| `https://developer.android.com/reference/kotlin/androidx/health/connect/client/units/Mass?` | `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment#weight()` Weight used in the segment. |

## Constants

### EXERCISE_SEGMENT_TYPE_ARM_CURL

```
const val EXERCISE_SEGMENT_TYPE_ARM_CURL = 1: Int
```

Use this type for arm curls.

### EXERCISE_SEGMENT_TYPE_BACK_EXTENSION

```
const val EXERCISE_SEGMENT_TYPE_BACK_EXTENSION = 2: Int
```

Use this type for back extensions.

### EXERCISE_SEGMENT_TYPE_BALL_SLAM

```
const val EXERCISE_SEGMENT_TYPE_BALL_SLAM = 3: Int
```

Use this type for ball slams.

### EXERCISE_SEGMENT_TYPE_BARBELL_SHOULDER_PRESS

```
const val EXERCISE_SEGMENT_TYPE_BARBELL_SHOULDER_PRESS = 4: Int
```

Use this type for barbel shoulder press.

### EXERCISE_SEGMENT_TYPE_BENCH_PRESS

```
const val EXERCISE_SEGMENT_TYPE_BENCH_PRESS = 5: Int
```

Use this type for bench presses.

### EXERCISE_SEGMENT_TYPE_BENCH_SIT_UP

```
const val EXERCISE_SEGMENT_TYPE_BENCH_SIT_UP = 6: Int
```

Use this type for bench sit up.

### EXERCISE_SEGMENT_TYPE_BIKING

```
const val EXERCISE_SEGMENT_TYPE_BIKING = 7: Int
```

Use this type for biking.

### EXERCISE_SEGMENT_TYPE_BIKING_STATIONARY

```
const val EXERCISE_SEGMENT_TYPE_BIKING_STATIONARY = 8: Int
```

Use this type for stationary biking.

### EXERCISE_SEGMENT_TYPE_BURPEE

```
const val EXERCISE_SEGMENT_TYPE_BURPEE = 9: Int
```

Use this type for burpees.

### EXERCISE_SEGMENT_TYPE_CRUNCH

```
const val EXERCISE_SEGMENT_TYPE_CRUNCH = 10: Int
```

Use this type for crunches.

### EXERCISE_SEGMENT_TYPE_DEADLIFT

```
const val EXERCISE_SEGMENT_TYPE_DEADLIFT = 11: Int
```

Use this type for deadlifts.

### EXERCISE_SEGMENT_TYPE_DOUBLE_ARM_TRICEPS_EXTENSION

```
const val EXERCISE_SEGMENT_TYPE_DOUBLE_ARM_TRICEPS_EXTENSION = 12: Int
```

Use this type for double arms triceps extensions.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_LEFT_ARM

```
const val EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_LEFT_ARM = 13: Int
```

Use this type for left arm dumbbell curl.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_RIGHT_ARM

```
const val EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_RIGHT_ARM = 14: Int
```

### EXERCISE_SEGMENT_TYPE_DUMBBELL_FRONT_RAISE

```
const val EXERCISE_SEGMENT_TYPE_DUMBBELL_FRONT_RAISE = 15: Int
```

Use this type for right arm dumbbell curl.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_LATERAL_RAISE

```
const val EXERCISE_SEGMENT_TYPE_DUMBBELL_LATERAL_RAISE = 16: Int
```

Use this type for dumbbell lateral raises.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_ROW

```
const val EXERCISE_SEGMENT_TYPE_DUMBBELL_ROW = 17: Int
```

Use this type for dumbbells rows.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_LEFT_ARM

```
const val EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_LEFT_ARM = 18: Int
```

Use this type for left arm triceps extensions.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_RIGHT_ARM

```
const val EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_RIGHT_ARM = 19: Int
```

Use this type for right arm triceps extensions.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_TWO_ARM

```
const val EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_TWO_ARM = 20: Int
```

Use this type for two arms triceps extensions.

### EXERCISE_SEGMENT_TYPE_ELLIPTICAL

```
const val EXERCISE_SEGMENT_TYPE_ELLIPTICAL = 21: Int
```

Use this type for elliptical workout.

### EXERCISE_SEGMENT_TYPE_FORWARD_TWIST

```
const val EXERCISE_SEGMENT_TYPE_FORWARD_TWIST = 22: Int
```

Use this type for forward twists.

### EXERCISE_SEGMENT_TYPE_FRONT_RAISE

```
const val EXERCISE_SEGMENT_TYPE_FRONT_RAISE = 23: Int
```

Use this type for front raises.

### EXERCISE_SEGMENT_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING

```
const val EXERCISE_SEGMENT_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING = 24: Int
```

Use this type for high intensity training.

### EXERCISE_SEGMENT_TYPE_HIP_THRUST

```
const val EXERCISE_SEGMENT_TYPE_HIP_THRUST = 25: Int
```

Use this type for hip thrusts.

### EXERCISE_SEGMENT_TYPE_HULA_HOOP

```
const val EXERCISE_SEGMENT_TYPE_HULA_HOOP = 26: Int
```

Use this type for hula-hoops.

### EXERCISE_SEGMENT_TYPE_JUMPING_JACK

```
const val EXERCISE_SEGMENT_TYPE_JUMPING_JACK = 27: Int
```

Use this type for jumping jacks.

### EXERCISE_SEGMENT_TYPE_JUMP_ROPE

```
const val EXERCISE_SEGMENT_TYPE_JUMP_ROPE = 28: Int
```

Use this type for jump rope.

### EXERCISE_SEGMENT_TYPE_KETTLEBELL_SWING

```
const val EXERCISE_SEGMENT_TYPE_KETTLEBELL_SWING = 29: Int
```

Use this type for kettlebell swings.

### EXERCISE_SEGMENT_TYPE_LATERAL_RAISE

```
const val EXERCISE_SEGMENT_TYPE_LATERAL_RAISE = 30: Int
```

Use this type for lateral raises.

### EXERCISE_SEGMENT_TYPE_LAT_PULL_DOWN

```
const val EXERCISE_SEGMENT_TYPE_LAT_PULL_DOWN = 31: Int
```

Use this type for lat pull-downs.

### EXERCISE_SEGMENT_TYPE_LEG_CURL

```
const val EXERCISE_SEGMENT_TYPE_LEG_CURL = 32: Int
```

Use this type for leg curls.

### EXERCISE_SEGMENT_TYPE_LEG_EXTENSION

```
const val EXERCISE_SEGMENT_TYPE_LEG_EXTENSION = 33: Int
```

Use this type for leg extensions.

### EXERCISE_SEGMENT_TYPE_LEG_PRESS

```
const val EXERCISE_SEGMENT_TYPE_LEG_PRESS = 34: Int
```

Use this type for leg presses.

### EXERCISE_SEGMENT_TYPE_LEG_RAISE

```
const val EXERCISE_SEGMENT_TYPE_LEG_RAISE = 35: Int
```

Use this type for leg raises.

### EXERCISE_SEGMENT_TYPE_LUNGE

```
const val EXERCISE_SEGMENT_TYPE_LUNGE = 36: Int
```

Use this type for lunges.

### EXERCISE_SEGMENT_TYPE_MOUNTAIN_CLIMBER

```
const val EXERCISE_SEGMENT_TYPE_MOUNTAIN_CLIMBER = 37: Int
```

Use this type for mountain climber.

### EXERCISE_SEGMENT_TYPE_OTHER_WORKOUT

```
const val EXERCISE_SEGMENT_TYPE_OTHER_WORKOUT = 38: Int
```

Use this type for other workout.

### EXERCISE_SEGMENT_TYPE_PAUSE

```
const val EXERCISE_SEGMENT_TYPE_PAUSE = 39: Int
```

Use this type for the pause.

### EXERCISE_SEGMENT_TYPE_PILATES

```
const val EXERCISE_SEGMENT_TYPE_PILATES = 40: Int
```

Use this type for pilates.

### EXERCISE_SEGMENT_TYPE_PLANK

```
const val EXERCISE_SEGMENT_TYPE_PLANK = 41: Int
```

Use this type for plank.

### EXERCISE_SEGMENT_TYPE_PULL_UP

```
const val EXERCISE_SEGMENT_TYPE_PULL_UP = 42: Int
```

Use this type for pull-ups.

### EXERCISE_SEGMENT_TYPE_PUNCH

```
const val EXERCISE_SEGMENT_TYPE_PUNCH = 43: Int
```

Use this type for punches.

### EXERCISE_SEGMENT_TYPE_REST

```
const val EXERCISE_SEGMENT_TYPE_REST = 44: Int
```

Use this type for the rest.

### EXERCISE_SEGMENT_TYPE_ROWING_MACHINE

```
const val EXERCISE_SEGMENT_TYPE_ROWING_MACHINE = 45: Int
```

Use this type for rowing machine workout.

### EXERCISE_SEGMENT_TYPE_RUNNING

```
const val EXERCISE_SEGMENT_TYPE_RUNNING = 46: Int
```

Use this type for running.

### EXERCISE_SEGMENT_TYPE_RUNNING_TREADMILL

```
const val EXERCISE_SEGMENT_TYPE_RUNNING_TREADMILL = 47: Int
```

Use this type for treadmill running.

### EXERCISE_SEGMENT_TYPE_SHOULDER_PRESS

```
const val EXERCISE_SEGMENT_TYPE_SHOULDER_PRESS = 48: Int
```

### EXERCISE_SEGMENT_TYPE_SINGLE_ARM_TRICEPS_EXTENSION

```
const val EXERCISE_SEGMENT_TYPE_SINGLE_ARM_TRICEPS_EXTENSION = 49: Int
```

Use this type for shoulder press.

### EXERCISE_SEGMENT_TYPE_SIT_UP

```
const val EXERCISE_SEGMENT_TYPE_SIT_UP = 50: Int
```

Use this type for sit-ups.

### EXERCISE_SEGMENT_TYPE_SQUAT

```
const val EXERCISE_SEGMENT_TYPE_SQUAT = 51: Int
```

Use this type for squats.

### EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING

```
const val EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING = 52: Int
```

Use this type for stair climbing.

### EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING_MACHINE

```
const val EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING_MACHINE = 53: Int
```

Use this type for stair climbing machine.

### EXERCISE_SEGMENT_TYPE_STRETCHING

```
const val EXERCISE_SEGMENT_TYPE_STRETCHING = 54: Int
```

Use this type for stretching.

### EXERCISE_SEGMENT_TYPE_SWIMMING_BACKSTROKE

```
const val EXERCISE_SEGMENT_TYPE_SWIMMING_BACKSTROKE = 55: Int
```

Use this type for backstroke swimming.

### EXERCISE_SEGMENT_TYPE_SWIMMING_BREASTSTROKE

```
const val EXERCISE_SEGMENT_TYPE_SWIMMING_BREASTSTROKE = 56: Int
```

Use this type for breaststroke swimming.

### EXERCISE_SEGMENT_TYPE_SWIMMING_BUTTERFLY

```
const val EXERCISE_SEGMENT_TYPE_SWIMMING_BUTTERFLY = 57: Int
```

Use this type for butterfly swimming.

### EXERCISE_SEGMENT_TYPE_SWIMMING_FREESTYLE

```
const val EXERCISE_SEGMENT_TYPE_SWIMMING_FREESTYLE = 58: Int
```

### EXERCISE_SEGMENT_TYPE_SWIMMING_MIXED

```
const val EXERCISE_SEGMENT_TYPE_SWIMMING_MIXED = 59: Int
```

Use this type for mixed swimming.

### EXERCISE_SEGMENT_TYPE_SWIMMING_OPEN_WATER

```
const val EXERCISE_SEGMENT_TYPE_SWIMMING_OPEN_WATER = 60: Int
```

Use this type for swimming in open water.

### EXERCISE_SEGMENT_TYPE_SWIMMING_OTHER

```
const val EXERCISE_SEGMENT_TYPE_SWIMMING_OTHER = 61: Int
```

Use this type if other swimming styles are not suitable.

### EXERCISE_SEGMENT_TYPE_SWIMMING_POOL

```
const val EXERCISE_SEGMENT_TYPE_SWIMMING_POOL = 62: Int
```

Use this type for swimming in the pool.

### EXERCISE_SEGMENT_TYPE_UNKNOWN

```
const val EXERCISE_SEGMENT_TYPE_UNKNOWN = 0: Int
```

Use this type if the type of the exercise segment is not known.

### EXERCISE_SEGMENT_TYPE_UPPER_TWIST

```
const val EXERCISE_SEGMENT_TYPE_UPPER_TWIST = 63: Int
```

Use this type for upper twists.

### EXERCISE_SEGMENT_TYPE_WALKING

```
const val EXERCISE_SEGMENT_TYPE_WALKING = 64: Int
```

Use this type for walking.

### EXERCISE_SEGMENT_TYPE_WEIGHTLIFTING

```
const val EXERCISE_SEGMENT_TYPE_WEIGHTLIFTING = 65: Int
```

Use this type for weightlifting.

### EXERCISE_SEGMENT_TYPE_WHEELCHAIR

```
const val EXERCISE_SEGMENT_TYPE_WHEELCHAIR = 66: Int
```

Use this type for wheelchair.

### EXERCISE_SEGMENT_TYPE_YOGA

```
const val EXERCISE_SEGMENT_TYPE_YOGA = 67: Int
```

Use this type for yoga.

## Public companion functions

### isSegmentTypeCompatibleWithSessionType

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

```
fun isSegmentTypeCompatibleWithSessionType(
    segmentType: Int,
    sessionType: Int
): Boolean
```

Is a segment type compatible with a session type.

For example, a swimming session can contain \[EXERCISE_SEGMENT_TYPE_SWIMMING_FREESTYLE\]
segments, but can't contain \[EXERCISE_SEGMENT_TYPE_YOGA\] segments.

| Parameters |
|---|---|
| `segmentType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the segment type to be contained within `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment.Companion#isSegmentTypeCompatibleWithSessionType(kotlin.Int,kotlin.Int)`. Value is one of the following: - `0` - `4` - `6` - `7` - `8` - `13` - `14` - `15` - `16` - `18` - `19` - `20` - `22` - `21` - `24` - `40` - `45` - `46` - `47` - `52` - `53` - `54` - `60` - `62` - `63` - `64` - `65` - `66` - `38` - `67` - `1` - `2` - `3` - `5` - `9` - `10` - `11` - `12` - `17` - `23` - `25` - `26` - `27` - `28` - `29` - `30` - `31` - `32` - `33` - `34` - `35` - `36` - `37` - `41` - `42` - `43` - `48` - `49` - `50` - `51` - `58` - `55` - `56` - `57` - `59` - `61` - `44` - `39` <br /> |
| `sessionType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the session type that should contain `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment.Companion#isSegmentTypeCompatibleWithSessionType(kotlin.Int,kotlin.Int)`. 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 /> |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True, if `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSegment.Companion#isSegmentTypeCompatibleWithSessionType(kotlin.Int,kotlin.Int)` can contain the provided segment, otherwise false. |

## Public constructors

### ExerciseSegment

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

```
ExerciseSegment(
    startTime: Instant,
    endTime: Instant,
    segmentType: Int,
    repetitions: @IntRange(from = 0) Int = 0,
    weight: Mass? = null,
    setIndex: @IntRange(from = 0) Int? = 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)

```
val endTime: Instant
```

### 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 segment.

Values correspond to the Borg CR10 RPE scale and must be in the range 0 to 10 inclusive.

- 0: No exertion (at rest)

- 1: Very light

- 2-3: Light

- 4-5: Moderate

- 6-7: Hard

- 8-9: Very hard

- 10: Maximum effort

### repetitions

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

```
val repetitions: @IntRange(from = 0) Int
```

Number of repetitions in the segment. Must be non-negative.

### segmentType

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

```
val segmentType: Int
```

Type of segment (e.g. biking, plank).

Value is one of the following:

- `0`
- `4`
- `6`
- `7`
- `8`
- `13`
- `14`
- `15`
- `16`
- `18`
- `19`
- `20`
- `22`
- `21`
- `24`
- `40`
- `45`
- `46`
- `47`
- `52`
- `53`
- `54`
- `60`
- `62`
- `63`
- `64`
- `65`
- `66`
- `38`
- `67`
- `1`
- `2`
- `3`
- `5`
- `9`
- `10`
- `11`
- `12`
- `17`
- `23`
- `25`
- `26`
- `27`
- `28`
- `29`
- `30`
- `31`
- `32`
- `33`
- `34`
- `35`
- `36`
- `37`
- `41`
- `42`
- `43`
- `48`
- `49`
- `50`
- `51`
- `58`
- `55`
- `56`
- `57`
- `59`
- `61`
- `44`
- `39`

<br />

### setIndex

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

```
val setIndex: @IntRange(from = 0) Int?
```

Index of the set in the session.

A set is a group of consecutive repetitions (reps) of a specific exercise performed without a break, e.g. 10 push-ups in a row without stopping.

A set index represents the position of this set relative to other sets in the session. For instance, if an exercise has three sets, they will have setIndex values of 0, 1, and 2 respectively.

Multiple segments may be part of a single set, for example if a collection of activities are considered to be a single set, in which case those segments would have the same set index.

The set index may also go back to zero in a single `https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/ExerciseSessionRecord`. For example, if three sets of one activity are completed followed by three sets of another, setIndex values of 0, 1, 2, 0, 1, 2 would be expected for those segments.

Must be non-negative.

### startTime

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

```
val startTime: Instant
```

### weight

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

```
val weight: Mass?
```

Weight used in the segment. Must be non-negative.