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 ActivityIntensityRecord

Constants
static Int

Moderate activity intensity.

static Int

Vigorous activity intensity.

Public methods
Boolean
equals(other: Any?)

Indicates whether some other object is "equal to" this one.

Int

Returns the type of the activity intensity.

Int

Inherited functions
Properties
static AggregationType<Duration!>

Metric identifier to retrieve the total duration of activity intensity regardless of the type using aggregate APIs in android.health.connect.HealthConnectManager.

static AggregationType<Long!>

Metric identifier to retrieve the number of weighted intensity minutes using aggregate APIs in android.health.connect.HealthConnectManager.

static AggregationType<Duration!>

Metric identifier to retrieve the total duration of moderate activity intensity using aggregate APIs in android.health.connect.HealthConnectManager.

static AggregationType<Duration!>

Metric identifier to retrieve the total duration of vigorous activity intensity using aggregate APIs in android.health.connect.HealthConnectManager.

Constants

ACTIVITY_INTENSITY_TYPE_MODERATE

static val ACTIVITY_INTENSITY_TYPE_MODERATE: Int

Moderate activity intensity.

Value: 0

ACTIVITY_INTENSITY_TYPE_VIGOROUS

static val ACTIVITY_INTENSITY_TYPE_VIGOROUS: Int

Vigorous activity intensity.

Value: 1

Public methods

equals

Added in API level 36
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.

Return
Int Value is android.health.connect.datatypes.ActivityIntensityRecord#ACTIVITY_INTENSITY_TYPE_MODERATE, or android.health.connect.datatypes.ActivityIntensityRecord#ACTIVITY_INTENSITY_TYPE_VIGOROUS

hashCode

Added in API level 36
fun hashCode(): Int
Return
Int a hash code value for this object.

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.