Package-level declarations

Health data and the availability and permission state of Health Connect and HealthKit.

Types

Link copied to clipboard

Represents the availability status of the Health Connect SDK on the device.

Link copied to clipboard
data class HealthConnectDiagnostics(val sdkStatus: HealthConnectAvailabilityStatus, val providerPackageName: String, val providerVersionName: String?, val providerVersionCode: Long?, val deviceApiLevel: Int, val isFrameworkModule: Boolean, val grantedPermissions: Set<String>, val missingPermissions: Set<String>, val backgroundReadAvailable: Boolean, val historyReadAvailable: Boolean)

A snapshot of Health Connect diagnostic information for debugging purposes (Android only).

Link copied to clipboard
data class HealthData(val date: LocalDate? = null, val timeZoneId: String? = TimeZone.currentSystemDefault().id, val startZonedDateTime: String? = null, val endZonedDateTime: String? = null, val steps: Long? = null, val calories: Double? = null, val caloriesUnit: UnitTypes? = null, val distance: Double? = null, val distanceUnits: UnitTypes? = null, val duration: Long? = null, val durationUnit: UnitTypes? = null)

HealthData — represents a daily snapshot of physical activity.

Link copied to clipboard

Represents the authorization-request status for HealthKit.

Link copied to clipboard
data class HealthKitDataSource(val name: String, val bundleId: String?)

Represents a source (app or device) that has contributed health data to HealthKit.

Link copied to clipboard
data class HealthKitDiagnostics(val isHealthDataAvailable: Boolean, val authorizationRequestStatus: HealthKitAuthRequestStatus, val stepTrackingStatus: HealthPermissionStatus, val osVersion: String, val deviceModel: String, val requestedReadTypes: Set<String>, val stepDataSources: List<HealthKitDataSource> = emptyList())

A snapshot of Apple HealthKit diagnostic information for debugging purposes.

Link copied to clipboard

Represents the inferred read-permission status for health data tracking.

Link copied to clipboard
data class HydrationSummary(val date: LocalDate, val volumeMilliliters: Double, val entryCount: Int = 0)

Aggregated water intake for a single day, pulled from HealthKit HKQuantityTypeIdentifierDietaryWater on iOS or Health Connect HydrationRecord on Android.

Link copied to clipboard
data class MindfulnessSession(val startTimeIso: String, val endTimeIso: String, val startTimeEpochSeconds: Long, val endTimeEpochSeconds: Long, val durationMinutes: Double, val sourceName: String? = null)

A single mindfulness / meditation session, pulled from HealthKit's HKCategoryTypeIdentifierMindfulSession on iOS. Android Health Connect does not yet have a native mindful-session record; the Android actual returns an empty list.

Link copied to clipboard
data class NutritionSummary(val date: LocalDate, val energyKilocalories: Double? = null, val proteinGrams: Double? = null, val carbsGrams: Double? = null, val fatGrams: Double? = null, val entryCount: Int = 0)

Daily nutrition roll-up, derived from HealthKit dietary samples on iOS or Health Connect NutritionRecord entries on Android.

Link copied to clipboard

Unit of measure for a health metric.

Link copied to clipboard
data class WorkoutSession(val activityType: String, val startTimeIso: String, val endTimeIso: String, val startTimeEpochSeconds: Long, val endTimeEpochSeconds: Long, val durationMinutes: Double, val totalEnergyKilocalories: Double? = null, val totalDistanceMeters: Double? = null, val sourceName: String? = null)

A single workout / exercise session pulled from the device's health store (HealthKit HKWorkout on iOS, ExerciseSessionRecord on Android Health Connect).