UnitTypes

Unit of measure for a health metric.

Accompanies the numeric values returned in health and activity payloads so a consumer can render the correct suffix and convert between systems without guessing from context. Group the values by what they measure:

The SDK does not convert between units on your behalf — render or convert using whichever member-facing system (metric/imperial) your app prefers.

Entries

Link copied to clipboard

Distance in meters (SI base unit of length).

Link copied to clipboard

Distance in statute miles (~1609.34 meters). Common for US members.

Link copied to clipboard

Distance in kilometers (1000 meters).

Link copied to clipboard

Duration in seconds (SI base unit of time).

Link copied to clipboard

Duration in minutes (60 seconds).

Link copied to clipboard

Duration in hours (3600 seconds).

Link copied to clipboard

Energy in small calories (cal). Note: dietary "Calories" are KILOCALORIE.

Link copied to clipboard

Energy in kilocalories (kcal) — the unit shown on nutrition labels as "Calories".

Link copied to clipboard

A raw step count (dimensionless).

Link copied to clipboard

Mass in pounds (~0.4536 kilograms). Common for US members.

Link copied to clipboard

Mass in ounces (1/16 of a POUND).

Link copied to clipboard

Temperature in degrees Celsius.

Link copied to clipboard

Temperature in degrees Fahrenheit.

Link copied to clipboard

Mass in kilograms (SI base unit of mass).

Link copied to clipboard

A ratio expressed as a percentage in the range 0–100.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard
fun valueOf(value: String): UnitTypes

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.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.