DataType

public final class DataType extends ProtoParcelable

Object
   ↳ ProtoParcelable
     ↳ DataType

A data type is a representation of health data managed by Health Services.

A DataType specifies the format of the values inside a DataPoint. Health Services defines data types for instantaneous observations TimeType.SAMPLE(e.g. heart rate) and data types for change between readings TimeType.INTERVAL(e.g. distance).

Note: the data type defines only the representation and format of the data, and not how it's being collected, the sensor being used, or the parameters of the collection.

Summary

Nested types

DataType.Companion
DataType.TimeType

Whether the DataType corresponds to a measurement spanning an interval, or a sample at a single point in time.

Public fields

final int

Returns the expected format for a Value of this DataType.

final @NonNull String

Returns the name of this DataType, e.g.

final @NonNull DataType.TimeType

Returns the TimeType of this DataType.

Public constructors

DataType(String name, DataType.TimeType timeType, int format)

Public methods

@NonNull String

Inherited methods

From class ProtoParcelable
int
boolean
equals(Object other)
int
void
writeToParcel(Parcel dest, int flags)

Public fields

format

public final int format

Returns the expected format for a Value of this DataType.

name

public final @NonNull String name

Returns the name of this DataType, e.g. "Steps".

timeType

public final @NonNull DataType.TimeType timeType

Returns the TimeType of this DataType.

Public constructors

DataType

public final DataType(String name, DataType.TimeType timeType, int format)

Public methods

toString

public @NonNull String toString()