Builder
class Builder
| kotlin.Any | |
| ↳ | android.health.connect.datatypes.ExerciseSessionRecord.Builder | 
Builder class for ExerciseSessionRecord
Summary
| Public constructors | |
|---|---|
| Public methods | |
|---|---|
| ExerciseSessionRecord | build()Returns  | 
| ExerciseSessionRecord.Builder | Sets the start zone offset of this record to system default. | 
| ExerciseSessionRecord.Builder | Clears the rate of perceived exertion for this exercise session. | 
| ExerciseSessionRecord.Builder | Sets the start zone offset of this record to system default. | 
| ExerciseSessionRecord.Builder | setEndZoneOffset(endZoneOffset: ZoneOffset)Sets the zone offset of the user when the session ended | 
| ExerciseSessionRecord.Builder | setLaps(laps: MutableList<ExerciseLap!>)Sets segments for this session. | 
| ExerciseSessionRecord.Builder | setNotes(notes: CharSequence?)Sets notes for this activity | 
| ExerciseSessionRecord.Builder | Sets the  | 
| ExerciseSessionRecord.Builder | setRateOfPerceivedExertion(rateOfPerceivedExertion: Float)Sets rate of perceived exertion (RPE) used during the exercise session. | 
| ExerciseSessionRecord.Builder | setRoute(route: ExerciseRoute?)Sets route for this activity | 
| ExerciseSessionRecord.Builder | setSegments(segments: MutableList<ExerciseSegment!>)Sets segments for this session. | 
| ExerciseSessionRecord.Builder | setStartZoneOffset(startZoneOffset: ZoneOffset)Sets the zone offset of the user when the session started | 
| ExerciseSessionRecord.Builder | setTitle(title: CharSequence?)Sets a title of this activity | 
Public constructors
Builder
Builder(
metadata: Metadata,
startTime: Instant,
endTime: Instant,
exerciseType: Int)
Public methods
build
fun build(): ExerciseSessionRecord
Returns ExerciseSessionRecord
| Return | |
|---|---|
| ExerciseSessionRecord | This value cannot be null. | 
clearEndZoneOffset
fun clearEndZoneOffset(): ExerciseSessionRecord.Builder
Sets the start zone offset of this record to system default.
| Return | |
|---|---|
| ExerciseSessionRecord.Builder | This value cannot be null. | 
clearRateOfPerceivedExertion
fun clearRateOfPerceivedExertion(): ExerciseSessionRecord.Builder
Clears the rate of perceived exertion for this exercise session.
Returns builder instance without rate of perceived exertion.
| Return | |
|---|---|
| ExerciseSessionRecord.Builder | This value cannot be null. | 
clearStartZoneOffset
fun clearStartZoneOffset(): ExerciseSessionRecord.Builder
Sets the start zone offset of this record to system default.
| Return | |
|---|---|
| ExerciseSessionRecord.Builder | This value cannot be null. | 
setEndZoneOffset
fun setEndZoneOffset(endZoneOffset: ZoneOffset): ExerciseSessionRecord.Builder
Sets the zone offset of the user when the session ended
| Parameters | |
|---|---|
| endZoneOffset | ZoneOffset: This value cannot be null. | 
| Return | |
|---|---|
| ExerciseSessionRecord.Builder | This value cannot be null. | 
setLaps
fun setLaps(laps: MutableList<ExerciseLap!>): ExerciseSessionRecord.Builder
Sets segments for this session.
| Parameters | |
|---|---|
| laps | MutableList<ExerciseLap!>: list of ExerciseLapof this session This value cannot benull. | 
| Return | |
|---|---|
| ExerciseSessionRecord.Builder | This value cannot be null. | 
setNotes
fun setNotes(notes: CharSequence?): ExerciseSessionRecord.Builder
Sets notes for this activity
| Parameters | |
|---|---|
| notes | CharSequence?: Notes for this activity This value may be null. | 
| Return | |
|---|---|
| ExerciseSessionRecord.Builder | This value cannot be null. | 
setPlannedExerciseSessionId
fun setPlannedExerciseSessionId(id: String?): ExerciseSessionRecord.Builder
Sets the PlannedExerciseSessionRecord that this session was based upon.
| Parameters | |
|---|---|
| id | String?: This value may be null. | 
| Return | |
|---|---|
| ExerciseSessionRecord.Builder | This value cannot be null. | 
setRateOfPerceivedExertion
fun setRateOfPerceivedExertion(rateOfPerceivedExertion: Float): ExerciseSessionRecord.Builder
Sets rate of perceived exertion (RPE) used during the exercise session.
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
Returns builder instance with rate of perceived exertion set.
| Parameters | |
|---|---|
| rateOfPerceivedExertion | Float: Value is between 0.0f and 10.0f inclusive | 
| Return | |
|---|---|
| ExerciseSessionRecord.Builder | This value cannot be null. | 
setRoute
fun setRoute(route: ExerciseRoute?): ExerciseSessionRecord.Builder
Sets route for this activity
| Parameters | |
|---|---|
| route | ExerciseRoute?: ExerciseRoute for this activity This value may be null. | 
| Return | |
|---|---|
| ExerciseSessionRecord.Builder | This value cannot be null. | 
setSegments
fun setSegments(segments: MutableList<ExerciseSegment!>): ExerciseSessionRecord.Builder
Sets segments for this session.
| Parameters | |
|---|---|
| segments | MutableList<ExerciseSegment!>: list of ExerciseSegmentof this session This value cannot benull. | 
| Return | |
|---|---|
| ExerciseSessionRecord.Builder | This value cannot be null. | 
setStartZoneOffset
fun setStartZoneOffset(startZoneOffset: ZoneOffset): ExerciseSessionRecord.Builder
Sets the zone offset of the user when the session started
| Parameters | |
|---|---|
| startZoneOffset | ZoneOffset: This value cannot be null. | 
| Return | |
|---|---|
| ExerciseSessionRecord.Builder | This value cannot be null. | 
setTitle
fun setTitle(title: CharSequence?): ExerciseSessionRecord.Builder
Sets a title of this activity
| Parameters | |
|---|---|
| title | CharSequence?: Title of this activity This value may be null. | 
| Return | |
|---|---|
| ExerciseSessionRecord.Builder | This value cannot be null. | 
