HealthConnectFeatures
public interface HealthConnectFeatures
Interface for checking availability of features in HealthConnectClient.
Summary
Constants |
|
|---|---|
default static final int |
Feature constant for Activity Intensity APIs. |
default static final int |
Feature constant for exercise session improvements. |
default static final int |
Feature constant for extended device types. |
default static final int |
Feature constant for Matchmaking APIs. |
default static final int |
Feature constant for mindfulness session. |
default static final int |
Feature constant for Personal Health Records APIs. |
default static final int |
Feature constant for planned exercise sessions. |
default static final int |
Feature constant for reading health data history. |
default static final int |
Feature constant for reading health data in background. |
default static final int |
Feature constant for skin temperature. |
default static final int |
Indicates that a feature is available and the corresponding APIs can be used at runtime. |
default static final int |
Indicates that a feature is unavailable and the corresponding APIs cannot be used at runtime. |
Public methods |
|
|---|---|
abstract int |
getFeatureStatus(int feature)Checks whether the given feature is available. |
Constants
FEATURE_ACTIVITY_INTENSITY
default static final int FEATURE_ACTIVITY_INTENSITY = 7
Feature constant for Activity Intensity APIs.
FEATURE_EXERCISE_SESSION_IMPROVEMENTS
default static final int FEATURE_EXERCISE_SESSION_IMPROVEMENTS = 9
Feature constant for exercise session improvements.
When this feature is available, the following fields are supported:
-
ExerciseSessionRecord.rateOfPerceivedExertion -
ExerciseSegment.weight -
ExerciseSegment.setIndex -
ExerciseSegment.rateOfPerceivedExertion
FEATURE_EXTENDED_DEVICE_TYPES
default static final int FEATURE_EXTENDED_DEVICE_TYPES = 8
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_MATCHMAKING
@ExperimentalMatchmakingApi
default static final int FEATURE_MATCHMAKING = 10
Feature constant for Matchmaking APIs.
FEATURE_MINDFULNESS_SESSION
default static final int FEATURE_MINDFULNESS_SESSION = 5
Feature constant for mindfulness session.
FEATURE_PERSONAL_HEALTH_RECORD
@ExperimentalPersonalHealthRecordApi
default static final int FEATURE_PERSONAL_HEALTH_RECORD = 6
Feature constant for Personal Health Records APIs.
FEATURE_PLANNED_EXERCISE
default static final int FEATURE_PLANNED_EXERCISE = 3
Feature constant for planned exercise sessions.
FEATURE_READ_HEALTH_DATA_HISTORY
default static final int FEATURE_READ_HEALTH_DATA_HISTORY = 4
Feature constant for reading health data history.
FEATURE_READ_HEALTH_DATA_IN_BACKGROUND
default static final int FEATURE_READ_HEALTH_DATA_IN_BACKGROUND = 1
Feature constant for reading health data in background.
FEATURE_SKIN_TEMPERATURE
default static final int FEATURE_SKIN_TEMPERATURE = 2
Feature constant for skin temperature.
FEATURE_STATUS_AVAILABLE
default static final int FEATURE_STATUS_AVAILABLE = 2
Indicates that a feature is available and the corresponding APIs can be used at runtime.
FEATURE_STATUS_UNAVAILABLE
default static final int FEATURE_STATUS_UNAVAILABLE = 1
Indicates that a feature is unavailable and the corresponding APIs cannot be used at runtime.
Public methods
getFeatureStatus
abstract int getFeatureStatus(int feature)
Checks whether the given feature is available.
| Parameters | |
|---|---|
int feature |
the feature to be checked. One of the "FEATURE_" constants in this class. |
| Returns | |
|---|---|
int |
one of |