HealthConnectFeatures
interface HealthConnectFeatures
Interface for checking availability of features in HealthConnectClient.
Summary
Constants |
|
|---|---|
const Int |
Feature constant for Activity Intensity APIs. |
const Int |
Feature constant for extended device types. |
const Int |
Feature constant for mindfulness session. |
const Int |
Feature constant for Personal Health Records APIs. |
const Int |
Feature constant for planned exercise sessions. |
const Int |
Feature constant for reading health data history. |
const Int |
Feature constant for reading health data in background. |
const Int |
Feature constant for skin temperature. |
const Int |
Indicates that a feature is available and the corresponding APIs can be used at runtime. |
const Int |
Indicates that a feature is unavailable and the corresponding APIs cannot be used at runtime. |
Public functions |
|
|---|---|
Int |
getFeatureStatus(feature: Int)Checks whether the given feature is available. |
Constants
FEATURE_ACTIVITY_INTENSITY
const val FEATURE_ACTIVITY_INTENSITY = 7: Int
Feature constant for Activity Intensity APIs.
FEATURE_EXTENDED_DEVICE_TYPES
const val FEATURE_EXTENDED_DEVICE_TYPES = 8: Int
Feature constant for extended device types.
When this feature is available, the following device types are supported:
-
Device.TYPE_CONSUMER_MEDICAL_DEVICE -
Device.TYPE_GLASSES -
Device.TYPE_HEARABLE -
Device.TYPE_FITNESS_MACHINE -
Device.TYPE_FITNESS_EQUIPMENT -
Device.TYPE_PORTABLE_COMPUTER -
Device.TYPE_METER
If this feature is not available, these device types will be treated as Device.TYPE_UNKNOWN.
FEATURE_MINDFULNESS_SESSION
const val FEATURE_MINDFULNESS_SESSION = 5: Int
Feature constant for mindfulness session.
FEATURE_PERSONAL_HEALTH_RECORD
@ExperimentalPersonalHealthRecordApi
const val FEATURE_PERSONAL_HEALTH_RECORD = 6: Int
Feature constant for Personal Health Records APIs.
FEATURE_PLANNED_EXERCISE
const val FEATURE_PLANNED_EXERCISE = 3: Int
Feature constant for planned exercise sessions.
FEATURE_READ_HEALTH_DATA_HISTORY
const val FEATURE_READ_HEALTH_DATA_HISTORY = 4: Int
Feature constant for reading health data history.
FEATURE_READ_HEALTH_DATA_IN_BACKGROUND
const val FEATURE_READ_HEALTH_DATA_IN_BACKGROUND = 1: Int
Feature constant for reading health data in background.
FEATURE_SKIN_TEMPERATURE
const val FEATURE_SKIN_TEMPERATURE = 2: Int
Feature constant for skin temperature.
FEATURE_STATUS_AVAILABLE
const val FEATURE_STATUS_AVAILABLE = 2: Int
Indicates that a feature is available and the corresponding APIs can be used at runtime.
FEATURE_STATUS_UNAVAILABLE
const val FEATURE_STATUS_UNAVAILABLE = 1: Int
Indicates that a feature is unavailable and the corresponding APIs cannot be used at runtime.
Public functions
getFeatureStatus
fun getFeatureStatus(feature: Int): Int
Checks whether the given feature is available.
| Parameters | |
|---|---|
feature: Int |
the feature to be checked. One of the "FEATURE_" constants in this class. |
| Returns | |
|---|---|
Int |
one of |