ExerciseSessionRecord.Builder
public
static
final
class
ExerciseSessionRecord.Builder
extends Object
java.lang.Object | |
↳ | android.health.connect.datatypes.ExerciseSessionRecord.Builder |
Builder class for ExerciseSessionRecord
Summary
Public constructors | |
---|---|
Builder(Metadata metadata, Instant startTime, Instant endTime, int exerciseType)
|
Inherited methods | |
---|---|
Public constructors
Builder
public Builder (Metadata metadata, Instant startTime, Instant endTime, int exerciseType)
Public methods
build
public ExerciseSessionRecord build ()
Returns ExerciseSessionRecord
Returns | |
---|---|
ExerciseSessionRecord |
This value cannot be null . |
clearEndZoneOffset
public ExerciseSessionRecord.Builder clearEndZoneOffset ()
Sets the start zone offset of this record to system default.
Returns | |
---|---|
ExerciseSessionRecord.Builder |
This value cannot be null . |
clearStartZoneOffset
public ExerciseSessionRecord.Builder clearStartZoneOffset ()
Sets the start zone offset of this record to system default.
Returns | |
---|---|
ExerciseSessionRecord.Builder |
This value cannot be null . |
setEndZoneOffset
public ExerciseSessionRecord.Builder setEndZoneOffset (ZoneOffset endZoneOffset)
Sets the zone offset of the user when the session ended
Parameters | |
---|---|
endZoneOffset |
ZoneOffset : This value cannot be null . |
Returns | |
---|---|
ExerciseSessionRecord.Builder |
This value cannot be null . |
setLaps
public ExerciseSessionRecord.Builder setLaps (List<ExerciseLap> laps)
Sets segments for this session.
Parameters | |
---|---|
laps |
List : list of ExerciseLap of this session
This value cannot be null . |
Returns | |
---|---|
ExerciseSessionRecord.Builder |
This value cannot be null . |
setNotes
public ExerciseSessionRecord.Builder setNotes (CharSequence notes)
Sets notes for this activity
Parameters | |
---|---|
notes |
CharSequence : Notes for this activity
This value may be null . |
Returns | |
---|---|
ExerciseSessionRecord.Builder |
This value cannot be null . |
setPlannedExerciseSessionId
public ExerciseSessionRecord.Builder setPlannedExerciseSessionId (String id)
Sets the PlannedExerciseSessionRecord
that this session was based upon.
Parameters | |
---|---|
id |
String : This value may be null . |
Returns | |
---|---|
ExerciseSessionRecord.Builder |
This value cannot be null . |
setRoute
public ExerciseSessionRecord.Builder setRoute (ExerciseRoute route)
Sets route for this activity
Parameters | |
---|---|
route |
ExerciseRoute : ExerciseRoute for this activity
This value may be null . |
Returns | |
---|---|
ExerciseSessionRecord.Builder |
This value cannot be null . |
setSegments
public ExerciseSessionRecord.Builder setSegments (List<ExerciseSegment> segments)
Sets segments for this session.
Parameters | |
---|---|
segments |
List : list of ExerciseSegment of this session
This value cannot be null . |
Returns | |
---|---|
ExerciseSessionRecord.Builder |
This value cannot be null . |
setStartZoneOffset
public ExerciseSessionRecord.Builder setStartZoneOffset (ZoneOffset startZoneOffset)
Sets the zone offset of the user when the session started
Parameters | |
---|---|
startZoneOffset |
ZoneOffset : This value cannot be null . |
Returns | |
---|---|
ExerciseSessionRecord.Builder |
This value cannot be null . |
setTitle
public ExerciseSessionRecord.Builder setTitle (CharSequence title)
Sets a title of this activity
Parameters | |
---|---|
title |
CharSequence : Title of this activity
This value may be null . |
Returns | |
---|---|
ExerciseSessionRecord.Builder |
This value cannot be null . |