ActivityIntensityRecord
public
final
class
ActivityIntensityRecord
extends IntervalRecord
| java.lang.Object | |||
| ↳ | 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 | |
|---|---|
class |
ActivityIntensityRecord.Builder
Builder class for |
Constants | |
|---|---|
int |
ACTIVITY_INTENSITY_TYPE_MODERATE
Moderate activity intensity. |
int |
ACTIVITY_INTENSITY_TYPE_VIGOROUS
Vigorous activity intensity. |
Fields | |
|---|---|
public
static
final
AggregationType<Duration> |
DURATION_TOTAL
Metric identifier to retrieve the total duration of activity intensity regardless of the type
using aggregate APIs in |
public
static
final
AggregationType<Long> |
INTENSITY_MINUTES_TOTAL
Metric identifier to retrieve the number of weighted intensity minutes using aggregate APIs
in |
public
static
final
AggregationType<Duration> |
MODERATE_DURATION_TOTAL
Metric identifier to retrieve the total duration of moderate activity intensity using
aggregate APIs in |
public
static
final
AggregationType<Duration> |
VIGOROUS_DURATION_TOTAL
Metric identifier to retrieve the total duration of vigorous activity intensity using
aggregate APIs in |
Public methods | |
|---|---|
boolean
|
equals(Object o)
Indicates whether some other object is "equal to" this one. |
int
|
getActivityIntensityType()
Returns the type of the activity intensity. |
int
|
hashCode()
Returns a hash code value for the object. |
Inherited methods | |
|---|---|
Constants
ACTIVITY_INTENSITY_TYPE_MODERATE
public static final int ACTIVITY_INTENSITY_TYPE_MODERATE
Moderate activity intensity.
Constant Value: 0 (0x00000000)
ACTIVITY_INTENSITY_TYPE_VIGOROUS
public static final int ACTIVITY_INTENSITY_TYPE_VIGOROUS
Vigorous activity intensity.
Constant Value: 1 (0x00000001)
Fields
DURATION_TOTAL
public static final AggregationType<Duration> DURATION_TOTAL
Metric identifier to retrieve the total duration of activity intensity regardless of the type
using aggregate APIs in HealthConnectManager.
Equivalent to MODERATE_DURATION_TOTAL + VIGOROUS_DURATION_TOTAL.
INTENSITY_MINUTES_TOTAL
public static final AggregationType<Long> INTENSITY_MINUTES_TOTAL
Metric identifier to retrieve the number of weighted intensity minutes using aggregate APIs
in 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
public static final AggregationType<Duration> MODERATE_DURATION_TOTAL
Metric identifier to retrieve the total duration of moderate activity intensity using
aggregate APIs in HealthConnectManager.
VIGOROUS_DURATION_TOTAL
public static final AggregationType<Duration> VIGOROUS_DURATION_TOTAL
Metric identifier to retrieve the total duration of vigorous activity intensity using
aggregate APIs in HealthConnectManager.
Public methods
equals
public boolean equals (Object o)
Indicates whether some other object is "equal to" this one.
| Parameters | |
|---|---|
o |
Object: This value may be null. |
| Returns | |
|---|---|
boolean |
true if this object is the same as the obj |
getActivityIntensityType
public int getActivityIntensityType ()
Returns the type of the activity intensity.
| Returns | |
|---|---|
int |
Value is ACTIVITY_INTENSITY_TYPE_MODERATE, or ACTIVITY_INTENSITY_TYPE_VIGOROUS |
hashCode
public int hashCode ()
Returns a hash code value for the object.
| Returns | |
|---|---|
int |
a hash code value for this object. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-03-13 UTC.