DataTypes

@ExperimentalGlanceWearApi
object DataTypes


A representation of health data managed by Health Services.

This provides access to various health metrics that can be used in Glance Wear Widgets, such as heart rate and daily activity totals.

Summary

Public properties

RemoteInt

Heart rate data is available with high accuracy.

RemoteInt

Heart rate data is available but the accuracy is low.

RemoteInt

Heart rate data is available and the accuracy is medium.

RemoteInt

Heart rate cannot be acquired because the sensor is not properly contacting skin.

RemoteInt

Heart rate accuracy is unknown.

RemoteInt

Heart rate data is currently too unreliable to be used.

RemoteFloat

The total number of calories burned over a day (including both BMR and active calories), expressed in kilocalories (kcal).

RemoteFloat

The total distance traveled over a day, expressed in meters.

RemoteFloat

The total number of floors climbed over a day.

RemoteInt

The total step count over a day.

RemoteInt

Heart rate sensor accuracy data.

RemoteFloat

Current heart rate, in beats per minute.

Public properties

HEART_RATE_ACCURACY_HIGH

Added in 1.0.0-alpha10
val HEART_RATE_ACCURACY_HIGHRemoteInt

Heart rate data is available with high accuracy.

HEART_RATE_ACCURACY_LOW

Added in 1.0.0-alpha10
val HEART_RATE_ACCURACY_LOWRemoteInt

Heart rate data is available but the accuracy is low.

HEART_RATE_ACCURACY_MEDIUM

Added in 1.0.0-alpha10
val HEART_RATE_ACCURACY_MEDIUMRemoteInt

Heart rate data is available and the accuracy is medium.

HEART_RATE_ACCURACY_NO_CONTACT

Added in 1.0.0-alpha10
val HEART_RATE_ACCURACY_NO_CONTACTRemoteInt

Heart rate cannot be acquired because the sensor is not properly contacting skin.

HEART_RATE_ACCURACY_UNKNOWN

Added in 1.0.0-alpha10
val HEART_RATE_ACCURACY_UNKNOWNRemoteInt

Heart rate accuracy is unknown.

HEART_RATE_ACCURACY_UNRELIABLE

Added in 1.0.0-alpha10
val HEART_RATE_ACCURACY_UNRELIABLERemoteInt

Heart rate data is currently too unreliable to be used.

dailyCalories

Added in 1.0.0-alpha10
val dailyCaloriesRemoteFloat

The total number of calories burned over a day (including both BMR and active calories), expressed in kilocalories (kcal).

It resets when 00:00 is reached in the device's current timezone. This can result in the daily period being greater or less than 24 hours if the timezone is changed.

Required permission: Manifest.permission.ACTIVITY_RECOGNITION

dailyDistanceMeters

Added in 1.0.0-alpha10
val dailyDistanceMetersRemoteFloat

The total distance traveled over a day, expressed in meters.

It resets when 00:00 is reached in the device's current timezone. This can result in the daily period being greater or less than 24 hours if the timezone is changed.

Required permission: Manifest.permission.ACTIVITY_RECOGNITION

dailyFloors

Added in 1.0.0-alpha10
val dailyFloorsRemoteFloat

The total number of floors climbed over a day.

It resets when 00:00 is reached in the device's current timezone. This can result in the daily period being greater or less than 24 hours if the timezone is changed.

Required permission: Manifest.permission.ACTIVITY_RECOGNITION

dailySteps

Added in 1.0.0-alpha10
val dailyStepsRemoteInt

The total step count over a day.

It resets when 00:00 is reached in the device's current timezone. This can result in the daily period being greater or less than 24 hours if the timezone is changed.

Required permission: Manifest.permission.ACTIVITY_RECOGNITION

heartRateAccuracy

Added in 1.0.0-alpha10
val heartRateAccuracyRemoteInt

Heart rate sensor accuracy data. The accuracy value is one of HEART_RATE_ACCURACY_* constants.

Required permissions are:

heartRateBpm

Added in 1.0.0-alpha10
val heartRateBpmRemoteFloat

Current heart rate, in beats per minute.

Required permissions are: