HealthConnectFeatures


@ExperimentalFeatureAvailabilityApi
interface HealthConnectFeatures


Interface for checking availability of features in HealthConnectClient.

Summary

Constants

const Int

Feature constant for reading health data in background.

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

Checks whether the given feature is available.

Constants

FEATURE_READ_HEALTH_DATA_IN_BACKGROUND

Added in 1.1.0-alpha09
const val FEATURE_READ_HEALTH_DATA_IN_BACKGROUND = 1: Int

Feature constant for reading health data in background.

FEATURE_STATUS_AVAILABLE

Added in 1.1.0-alpha09
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

Added in 1.1.0-alpha09
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

Added in 1.1.0-alpha09
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.