📄️ initialize
Initializes the health connect client with specific providers. If providerPackageName is not provided, the default Health Connect application package name will be considered com.google.android.apps.healthdata.
📄️ getSdkStatus
Determines whether an implementation of HealthConnectClient is available on the device at the moment. If none is available, apps may choose to redirect to package installers to find suitable providers. If providerPackageName is not provided, the default Health Connect application package name will be considered com.google.android.apps.healthdata.
📄️ requestPermission
Request permission for specified record types and access types.
📄️ getGrantedPermissions
Returns a set of all health permissions granted by the user to the calling provider app.
📄️ revokeAllPermissions
Revokes all previously granted permissions by the user to the calling app.
📄️ insertRecords
Inserts one or more record and returns newly generated records' uuids. Insertion of multiple records is executed in a transaction - if one fails, none is inserted.
📄️ readRecords
Retrieves a collection of records.
📄️ readRecord
Retrieves a single record of the specified type.
📄️ aggregateRecord
Reads aggregated result according to requested read criteria, for e.g, data origin filter and within a time range. Some record types do not support aggregation.
📄️ aggregateGroupByDuration
Reads aggregated group result by Duration according to requested read criteria. timeRangeSlicer needs to be specified for the Duration type (MILLIS' | 'SECONDS' | 'MINUTES' | 'HOURS' | 'DAYS) and length. Some record types do not support aggregation.
📄️ aggregateGroupByPeriod
Reads aggregated group result by Period according to requested read criteria. timeRangeSlicer needs to be specified for the Period type ('DAYS' | 'WEEKS' | 'MONTHS' | 'YEARS') and length. Period is date-based amount of time as opposed to Duration, which is a fixed length of time. Some record types do not support aggregation.
📄️ deleteRecordsByTimeRange
Deletes one or more record by their identifiers. Deletion of multiple record is executed in single transaction - if one fails, none is deleted.
📄️ deleteRecordsByUuids
Deletes one or more Record by their identifiers. Deletion of multiple Record is executed in single transaction - if one fails, none is deleted.
📄️ openHealthConnectSettings
Opens Health Connect app's settings.
📄️ openHealthConnectDataManagement
Opens Health Connect data management screen
📄️ requestExerciseRoute
Health Connect requires users' permission to access routes for exercise records (see Android docs). When exercise records are fetched, they will include an exerciseRoute field with a type (and possibly a route). This method should be called to request permissions to fetch the route if the type is ExerciseRouteResultType.CONSENT_REQUIRED.