PlannedExerciseSessionRecord
class PlannedExerciseSessionRecord : IntervalRecord
| kotlin.Any | |||
| ↳ | android.health.connect.datatypes.Record | ||
| ↳ | android.health.connect.datatypes.IntervalRecord | ||
| ↳ | android.health.connect.datatypes.PlannedExerciseSessionRecord | ||
Captures a planned exercise session, also commonly referred to as a training plan.
Each record contains a start time, end time, an exercise type and a list of PlannedExerciseBlock which describe the details of the planned session. The start and end times may be in the future.
Summary
| Nested classes | |
|---|---|
|
Builder class for |
|
| Public methods | |
|---|---|
| Boolean |
Indicates whether some other object is "equal to" this one. |
| MutableList<PlannedExerciseBlock!> |
Returns the exercise blocks for this step. |
| String? |
Returns the id of exercise session that completed this planned session. |
| Duration |
Returns the expected duration of the planned session. |
| Int |
Returns the exercise type of this planned session. |
| CharSequence? |
getNotes()Returns notes for this planned session. |
| LocalDate |
Returns the start date of the planned session. |
| CharSequence? |
getTitle()Returns title of this planned session. |
| Boolean |
Returns whether this planned session has an explicit time. |
| Int |
hashCode()Returns a hash code value for the object. |
| Inherited functions | |
|---|---|
Public methods
equals
fun equals(other: Any?): Boolean
Indicates whether some other object is "equal to" this one.
| Parameters | |
|---|---|
obj |
the reference object with which to compare. |
object |
the reference object with which to compare. This value may be null. |
o |
This value may be null. |
| Return | |
|---|---|
Boolean |
true if this object is the same as the obj |
getBlocks
fun getBlocks(): MutableList<PlannedExerciseBlock!>
Returns the exercise blocks for this step.
| Return | |
|---|---|
MutableList<PlannedExerciseBlock!> |
An unmodifiable list of PlannedExerciseBlock. This value cannot be null. |
getCompletedExerciseSessionId
fun getCompletedExerciseSessionId(): String?
Returns the id of exercise session that completed this planned session. Returns null if none exists.
getDuration
fun getDuration(): Duration
Returns the expected duration of the planned session.
| Return | |
|---|---|
Duration |
This value cannot be null. |
getExerciseType
fun getExerciseType(): Int
Returns the exercise type of this planned session.
getNotes
fun getNotes(): CharSequence?
Returns notes for this planned session. Returns null if it doesn't have notes.
getStartDate
fun getStartDate(): LocalDate
Returns the start date of the planned session.
| Return | |
|---|---|
LocalDate |
This value cannot be null. |
getTitle
fun getTitle(): CharSequence?
Returns title of this planned session. Returns null if it doesn't have a title.
hasExplicitTime
fun hasExplicitTime(): Boolean
Returns whether this planned session has an explicit time. If only a date was provided this will be false.
hashCode
fun hashCode(): Int
Returns a hash code value for the object.
| Return | |
|---|---|
Int |
a hash code value for this object. |