Language

ExerciseSegment.SetIndex Property

Definition

Gets the set index for this exercise segment.

public int SetIndex { [Android.Runtime.Register("getSetIndex", "()I", "", ApiSince=36)] get; }
[<get: Android.Runtime.Register("getSetIndex", "()I", "", ApiSince=36)>]
member this.SetIndex : int

Property Value

Value is 0 or greater

Attributes

Remarks

Gets the set index for this exercise segment.

The set index is a non-negative integer starting at zero.

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 is may also go back to zero in a single ExerciseSession. 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.

Use #hasSetIndex to check whether a set index exists for this segment. Multiple segments can share the same set index.

Java documentation for android.health.connect.datatypes.ExerciseSegment.getSetIndex().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to