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 |
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 |
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 . |
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 ExerciseLap of this session This value cannot be null . |
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 . |
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 ExerciseSegment of this session This value cannot be null . |
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 . |