Enum HealthDataKind
- All Implemented Interfaces:
Comparable<HealthDataKind>
What shape of data a
HealthDataType produces, and therefore which
HealthSample subclass a query for it returns.-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAn enumerated observation with no natural unit -- menstrual flow, a single sleep stage.A numeric measurement with a unit -- steps, heart rate, body mass.A run of measurements sharing one record identity -- a beat-to-beat heart-rate trace.A bounded activity with child data -- a workout, a night's sleep. -
Method Summary
Modifier and TypeMethodDescriptionstatic HealthDataKindReturns the enum constant of this type with the specified name.static HealthDataKind[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
QUANTITY
A numeric measurement with a unit -- steps, heart rate, body mass. ProducesQuantitySample. Maps toHKQuantitySampleand to Health Connect's numeric record types. -
CATEGORY
An enumerated observation with no natural unit -- menstrual flow, a single sleep stage. ProducesCategorySample. Maps toHKCategorySample. -
SERIES
A run of measurements sharing one record identity -- a beat-to-beat heart-rate trace. Produces
SeriesSample.This kind exists because the two platforms disagree: Health Connect's
HeartRateRecordis one record containing N samples, while HealthKit returns N independent samples. SeeSampleQuery.setFlattenSeries(boolean). -
SESSION
A bounded activity with child data -- a workout, a night's sleep. Produces aSessionSamplesubclass.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-