ActivityIntensityRecord
class ActivityIntensityRecord : IntervalRecord
| kotlin.Any | |||
| ↳ | android.health.connect.datatypes.Record | ||
| ↳ | android.health.connect.datatypes.IntervalRecord | ||
| ↳ | android.health.connect.datatypes.ActivityIntensityRecord | ||
Represents intensity of an activity.
Intensity can be either moderate or vigorous.
Each record requires the start time, the end time and the activity intensity type.
Summary
| Nested classes | |
|---|---|
|
Builder class for |
|
| Constants | |
|---|---|
| static Int |
Moderate activity intensity. |
| static Int |
Vigorous activity intensity. |
| Public methods | |
|---|---|
| Boolean |
Indicates whether some other object is "equal to" this one. |
| Int |
Returns the type of the activity intensity. |
| Int |
hashCode() |
| Inherited functions | |
|---|---|
| Properties | |
|---|---|
| static AggregationType<Duration!> |
Metric identifier to retrieve the total duration of activity intensity regardless of the type using aggregate APIs in |
| static AggregationType<Long!> |
Metric identifier to retrieve the number of weighted intensity minutes using aggregate APIs in |
| static AggregationType<Duration!> |
Metric identifier to retrieve the total duration of moderate activity intensity using aggregate APIs in |
| static AggregationType<Duration!> |
Metric identifier to retrieve the total duration of vigorous activity intensity using aggregate APIs in |
Constants
ACTIVITY_INTENSITY_TYPE_MODERATE
static val ACTIVITY_INTENSITY_TYPE_MODERATE: Int
Moderate activity intensity.
Value: 0ACTIVITY_INTENSITY_TYPE_VIGOROUS
static val ACTIVITY_INTENSITY_TYPE_VIGOROUS: Int
Vigorous activity intensity.
Value: 1Public 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 |
getActivityIntensityType
fun getActivityIntensityType(): Int
Returns the type of the activity intensity.
Properties
DURATION_TOTAL
static val DURATION_TOTAL: AggregationType<Duration!>
Metric identifier to retrieve the total duration of activity intensity regardless of the type using aggregate APIs in android.health.connect.HealthConnectManager.
Equivalent to MODERATE_DURATION_TOTAL + VIGOROUS_DURATION_TOTAL.
INTENSITY_MINUTES_TOTAL
static val INTENSITY_MINUTES_TOTAL: AggregationType<Long!>
Metric identifier to retrieve the number of weighted intensity minutes using aggregate APIs in android.health.connect.HealthConnectManager.
Records of type ACTIVITY_INTENSITY_TYPE_MODERATE contribute their full duration to the result, while records of type ACTIVITY_INTENSITY_TYPE_VIGOROUS contribute double their duration.
Equivalent to MODERATE_DURATION_TOTAL + 2 * VIGOROUS_DURATION_TOTAL rounded to minutes.
Calculated in minutes.
MODERATE_DURATION_TOTAL
static val MODERATE_DURATION_TOTAL: AggregationType<Duration!>
Metric identifier to retrieve the total duration of moderate activity intensity using aggregate APIs in android.health.connect.HealthConnectManager.
VIGOROUS_DURATION_TOTAL
static val VIGOROUS_DURATION_TOTAL: AggregationType<Duration!>
Metric identifier to retrieve the total duration of vigorous activity intensity using aggregate APIs in android.health.connect.HealthConnectManager.