# 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)

*** ** * ** ***


```
public final 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/androidx/health/connect/client/records/ExerciseSessionRecord` |   |

## Summary

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

| ### Public constructors |
|---|
| `https://developer.android.com/reference/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)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html startTime, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html endTime, int segmentType, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int repetitions, https://developer.android.com/reference/androidx/health/connect/client/units/Mass weight, @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) https://developer.android.com/reference/java/lang/Integer.html setIndex, @https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0.0, to = 10.0) https://developer.android.com/reference/java/lang/Float.html rateOfPerceivedExertion )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseSegment#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseSegment#getEndTime()()` |
| `final @https://developer.android.com/reference/androidx/annotation/FloatRange(from = 0.0, to = 10.0) https://developer.android.com/reference/java/lang/Float.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseSegment#getRateOfPerceivedExertion()()` Rate of perceived exertion (RPE) for the segment. |
| `final @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) int` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseSegment#getRepetitions()()` Number of repetitions in the segment. |
| `final int` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseSegment#getSegmentType()()` Type of segment (e.g. biking, plank). |
| `final @https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) https://developer.android.com/reference/java/lang/Integer.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseSegment#getSetIndex()()` Index of the set in the session. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/time/Instant.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseSegment#getStartTime()()` |
| `final https://developer.android.com/reference/androidx/health/connect/client/units/Mass` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseSegment#getWeight()()` Weight used in the segment. |
| `int` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseSegment#hashCode()()` |
| `static final boolean` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseSegment#isSegmentTypeCompatibleWithSessionType(kotlin.Int,kotlin.Int)( int segmentType, int sessionType )` Is a segment type compatible with a session type. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseSegment#toString()()` |

## Constants

### EXERCISE_SEGMENT_TYPE_ARM_CURL

```
public static final int EXERCISE_SEGMENT_TYPE_ARM_CURL = 1
```

Use this type for arm curls.

### EXERCISE_SEGMENT_TYPE_BACK_EXTENSION

```
public static final int EXERCISE_SEGMENT_TYPE_BACK_EXTENSION = 2
```

Use this type for back extensions.

### EXERCISE_SEGMENT_TYPE_BALL_SLAM

```
public static final int EXERCISE_SEGMENT_TYPE_BALL_SLAM = 3
```

Use this type for ball slams.

### EXERCISE_SEGMENT_TYPE_BARBELL_SHOULDER_PRESS

```
public static final int EXERCISE_SEGMENT_TYPE_BARBELL_SHOULDER_PRESS = 4
```

Use this type for barbel shoulder press.

### EXERCISE_SEGMENT_TYPE_BENCH_PRESS

```
public static final int EXERCISE_SEGMENT_TYPE_BENCH_PRESS = 5
```

Use this type for bench presses.

### EXERCISE_SEGMENT_TYPE_BENCH_SIT_UP

```
public static final int EXERCISE_SEGMENT_TYPE_BENCH_SIT_UP = 6
```

Use this type for bench sit up.

### EXERCISE_SEGMENT_TYPE_BIKING

```
public static final int EXERCISE_SEGMENT_TYPE_BIKING = 7
```

Use this type for biking.

### EXERCISE_SEGMENT_TYPE_BIKING_STATIONARY

```
public static final int EXERCISE_SEGMENT_TYPE_BIKING_STATIONARY = 8
```

Use this type for stationary biking.

### EXERCISE_SEGMENT_TYPE_BURPEE

```
public static final int EXERCISE_SEGMENT_TYPE_BURPEE = 9
```

Use this type for burpees.

### EXERCISE_SEGMENT_TYPE_CRUNCH

```
public static final int EXERCISE_SEGMENT_TYPE_CRUNCH = 10
```

Use this type for crunches.

### EXERCISE_SEGMENT_TYPE_DEADLIFT

```
public static final int EXERCISE_SEGMENT_TYPE_DEADLIFT = 11
```

Use this type for deadlifts.

### EXERCISE_SEGMENT_TYPE_DOUBLE_ARM_TRICEPS_EXTENSION

```
public static final int EXERCISE_SEGMENT_TYPE_DOUBLE_ARM_TRICEPS_EXTENSION = 12
```

Use this type for double arms triceps extensions.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_LEFT_ARM

```
public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_LEFT_ARM = 13
```

Use this type for left arm dumbbell curl.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_RIGHT_ARM

```
public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_CURL_RIGHT_ARM = 14
```

### EXERCISE_SEGMENT_TYPE_DUMBBELL_FRONT_RAISE

```
public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_FRONT_RAISE = 15
```

Use this type for right arm dumbbell curl.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_LATERAL_RAISE

```
public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_LATERAL_RAISE = 16
```

Use this type for dumbbell lateral raises.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_ROW

```
public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_ROW = 17
```

Use this type for dumbbells rows.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_LEFT_ARM

```
public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_LEFT_ARM = 18
```

Use this type for left arm triceps extensions.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_RIGHT_ARM

```
public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_RIGHT_ARM = 19
```

Use this type for right arm triceps extensions.

### EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_TWO_ARM

```
public static final int EXERCISE_SEGMENT_TYPE_DUMBBELL_TRICEPS_EXTENSION_TWO_ARM = 20
```

Use this type for two arms triceps extensions.

### EXERCISE_SEGMENT_TYPE_ELLIPTICAL

```
public static final int EXERCISE_SEGMENT_TYPE_ELLIPTICAL = 21
```

Use this type for elliptical workout.

### EXERCISE_SEGMENT_TYPE_FORWARD_TWIST

```
public static final int EXERCISE_SEGMENT_TYPE_FORWARD_TWIST = 22
```

Use this type for forward twists.

### EXERCISE_SEGMENT_TYPE_FRONT_RAISE

```
public static final int EXERCISE_SEGMENT_TYPE_FRONT_RAISE = 23
```

Use this type for front raises.

### EXERCISE_SEGMENT_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING

```
public static final int EXERCISE_SEGMENT_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING = 24
```

Use this type for high intensity training.

### EXERCISE_SEGMENT_TYPE_HIP_THRUST

```
public static final int EXERCISE_SEGMENT_TYPE_HIP_THRUST = 25
```

Use this type for hip thrusts.

### EXERCISE_SEGMENT_TYPE_HULA_HOOP

```
public static final int EXERCISE_SEGMENT_TYPE_HULA_HOOP = 26
```

Use this type for hula-hoops.

### EXERCISE_SEGMENT_TYPE_JUMPING_JACK

```
public static final int EXERCISE_SEGMENT_TYPE_JUMPING_JACK = 27
```

Use this type for jumping jacks.

### EXERCISE_SEGMENT_TYPE_JUMP_ROPE

```
public static final int EXERCISE_SEGMENT_TYPE_JUMP_ROPE = 28
```

Use this type for jump rope.

### EXERCISE_SEGMENT_TYPE_KETTLEBELL_SWING

```
public static final int EXERCISE_SEGMENT_TYPE_KETTLEBELL_SWING = 29
```

Use this type for kettlebell swings.

### EXERCISE_SEGMENT_TYPE_LATERAL_RAISE

```
public static final int EXERCISE_SEGMENT_TYPE_LATERAL_RAISE = 30
```

Use this type for lateral raises.

### EXERCISE_SEGMENT_TYPE_LAT_PULL_DOWN

```
public static final int EXERCISE_SEGMENT_TYPE_LAT_PULL_DOWN = 31
```

Use this type for lat pull-downs.

### EXERCISE_SEGMENT_TYPE_LEG_CURL

```
public static final int EXERCISE_SEGMENT_TYPE_LEG_CURL = 32
```

Use this type for leg curls.

### EXERCISE_SEGMENT_TYPE_LEG_EXTENSION

```
public static final int EXERCISE_SEGMENT_TYPE_LEG_EXTENSION = 33
```

Use this type for leg extensions.

### EXERCISE_SEGMENT_TYPE_LEG_PRESS

```
public static final int EXERCISE_SEGMENT_TYPE_LEG_PRESS = 34
```

Use this type for leg presses.

### EXERCISE_SEGMENT_TYPE_LEG_RAISE

```
public static final int EXERCISE_SEGMENT_TYPE_LEG_RAISE = 35
```

Use this type for leg raises.

### EXERCISE_SEGMENT_TYPE_LUNGE

```
public static final int EXERCISE_SEGMENT_TYPE_LUNGE = 36
```

Use this type for lunges.

### EXERCISE_SEGMENT_TYPE_MOUNTAIN_CLIMBER

```
public static final int EXERCISE_SEGMENT_TYPE_MOUNTAIN_CLIMBER = 37
```

Use this type for mountain climber.

### EXERCISE_SEGMENT_TYPE_OTHER_WORKOUT

```
public static final int EXERCISE_SEGMENT_TYPE_OTHER_WORKOUT = 38
```

Use this type for other workout.

### EXERCISE_SEGMENT_TYPE_PAUSE

```
public static final int EXERCISE_SEGMENT_TYPE_PAUSE = 39
```

Use this type for the pause.

### EXERCISE_SEGMENT_TYPE_PILATES

```
public static final int EXERCISE_SEGMENT_TYPE_PILATES = 40
```

Use this type for pilates.

### EXERCISE_SEGMENT_TYPE_PLANK

```
public static final int EXERCISE_SEGMENT_TYPE_PLANK = 41
```

Use this type for plank.

### EXERCISE_SEGMENT_TYPE_PULL_UP

```
public static final int EXERCISE_SEGMENT_TYPE_PULL_UP = 42
```

Use this type for pull-ups.

### EXERCISE_SEGMENT_TYPE_PUNCH

```
public static final int EXERCISE_SEGMENT_TYPE_PUNCH = 43
```

Use this type for punches.

### EXERCISE_SEGMENT_TYPE_REST

```
public static final int EXERCISE_SEGMENT_TYPE_REST = 44
```

Use this type for the rest.

### EXERCISE_SEGMENT_TYPE_ROWING_MACHINE

```
public static final int EXERCISE_SEGMENT_TYPE_ROWING_MACHINE = 45
```

Use this type for rowing machine workout.

### EXERCISE_SEGMENT_TYPE_RUNNING

```
public static final int EXERCISE_SEGMENT_TYPE_RUNNING = 46
```

Use this type for running.

### EXERCISE_SEGMENT_TYPE_RUNNING_TREADMILL

```
public static final int EXERCISE_SEGMENT_TYPE_RUNNING_TREADMILL = 47
```

Use this type for treadmill running.

### EXERCISE_SEGMENT_TYPE_SHOULDER_PRESS

```
public static final int EXERCISE_SEGMENT_TYPE_SHOULDER_PRESS = 48
```

### EXERCISE_SEGMENT_TYPE_SINGLE_ARM_TRICEPS_EXTENSION

```
public static final int EXERCISE_SEGMENT_TYPE_SINGLE_ARM_TRICEPS_EXTENSION = 49
```

Use this type for shoulder press.

### EXERCISE_SEGMENT_TYPE_SIT_UP

```
public static final int EXERCISE_SEGMENT_TYPE_SIT_UP = 50
```

Use this type for sit-ups.

### EXERCISE_SEGMENT_TYPE_SQUAT

```
public static final int EXERCISE_SEGMENT_TYPE_SQUAT = 51
```

Use this type for squats.

### EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING

```
public static final int EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING = 52
```

Use this type for stair climbing.

### EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING_MACHINE

```
public static final int EXERCISE_SEGMENT_TYPE_STAIR_CLIMBING_MACHINE = 53
```

Use this type for stair climbing machine.

### EXERCISE_SEGMENT_TYPE_STRETCHING

```
public static final int EXERCISE_SEGMENT_TYPE_STRETCHING = 54
```

Use this type for stretching.

### EXERCISE_SEGMENT_TYPE_SWIMMING_BACKSTROKE

```
public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_BACKSTROKE = 55
```

Use this type for backstroke swimming.

### EXERCISE_SEGMENT_TYPE_SWIMMING_BREASTSTROKE

```
public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_BREASTSTROKE = 56
```

Use this type for breaststroke swimming.

### EXERCISE_SEGMENT_TYPE_SWIMMING_BUTTERFLY

```
public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_BUTTERFLY = 57
```

Use this type for butterfly swimming.

### EXERCISE_SEGMENT_TYPE_SWIMMING_FREESTYLE

```
public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_FREESTYLE = 58
```

### EXERCISE_SEGMENT_TYPE_SWIMMING_MIXED

```
public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_MIXED = 59
```

Use this type for mixed swimming.

### EXERCISE_SEGMENT_TYPE_SWIMMING_OPEN_WATER

```
public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_OPEN_WATER = 60
```

Use this type for swimming in open water.

### EXERCISE_SEGMENT_TYPE_SWIMMING_OTHER

```
public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_OTHER = 61
```

Use this type if other swimming styles are not suitable.

### EXERCISE_SEGMENT_TYPE_SWIMMING_POOL

```
public static final int EXERCISE_SEGMENT_TYPE_SWIMMING_POOL = 62
```

Use this type for swimming in the pool.

### EXERCISE_SEGMENT_TYPE_UNKNOWN

```
public static final int EXERCISE_SEGMENT_TYPE_UNKNOWN = 0
```

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

### EXERCISE_SEGMENT_TYPE_UPPER_TWIST

```
public static final int EXERCISE_SEGMENT_TYPE_UPPER_TWIST = 63
```

Use this type for upper twists.

### EXERCISE_SEGMENT_TYPE_WALKING

```
public static final int EXERCISE_SEGMENT_TYPE_WALKING = 64
```

Use this type for walking.

### EXERCISE_SEGMENT_TYPE_WEIGHTLIFTING

```
public static final int EXERCISE_SEGMENT_TYPE_WEIGHTLIFTING = 65
```

Use this type for weightlifting.

### EXERCISE_SEGMENT_TYPE_WHEELCHAIR

```
public static final int EXERCISE_SEGMENT_TYPE_WHEELCHAIR = 66
```

Use this type for wheelchair.

### EXERCISE_SEGMENT_TYPE_YOGA

```
public static final int EXERCISE_SEGMENT_TYPE_YOGA = 67
```

Use this type for yoga.

## Public constructors

### ExerciseSegment

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

```
public ExerciseSegment(
    @NonNull Instant startTime,
    @NonNull Instant endTime,
    int segmentType,
    @IntRange(from = 0) int repetitions,
    Mass weight,
    @IntRange(from = 0) Integer setIndex,
    @FloatRange(from = 0.0, to = 10.0) Float rateOfPerceivedExertion
)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getEndTime

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

```
public final @NonNull Instant getEndTime()
```

### getRateOfPerceivedExertion

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

```
public final @FloatRange(from = 0.0, to = 10.0) Float getRateOfPerceivedExertion()
```

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

### getRepetitions

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

```
public final @IntRange(from = 0) int getRepetitions()
```

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

### getSegmentType

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

```
public final int getSegmentType()
```

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

### getSetIndex

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

```
public final @IntRange(from = 0) Integer getSetIndex()
```

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/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.

### getStartTime

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

```
public final @NonNull Instant getStartTime()
```

### getWeight

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

```
public final Mass getWeight()
```

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

### hashCode

```
public int hashCode()
```

### isSegmentTypeCompatibleWithSessionType

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

```
public static final boolean isSegmentTypeCompatibleWithSessionType(
    int segmentType,
    int sessionType
)
```

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 |
|---|---|
| `int segmentType` | the segment type to be contained within `https://developer.android.com/reference/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 /> |
| `int sessionType` | the session type that should contain `https://developer.android.com/reference/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 |
|---|---|
| `boolean` | True, if `https://developer.android.com/reference/androidx/health/connect/client/records/ExerciseSegment.Companion#isSegmentTypeCompatibleWithSessionType(kotlin.Int,kotlin.Int)` can contain the provided segment, otherwise false. |

### toString

```
public @NonNull String toString()
```