Skip to main content

Overview

Available methods

MethodDescription
getSdkStatusDetermines 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.
initializeInitialize the health connect client.
openHealthConnectSettingsOpens Health Connect app's settings app.
openHealthConnectDataManagementOpens Health Connect data management screen app.
requestPermissionRequest permission for specified record types and access types.
getGrantedPermissionsReturns a set of all health permissions granted by the user to the calling provider app.
revokeAllPermissionsRevokes all previously granted permissions by the user to the calling app.
insertRecordsInserts one or more records and returns newly assigned generated UUIDs. Insertion of multiple records is executed in a transaction - if one fails, none is inserted.
readRecordsRetrieves a collection of records.
readRecordRetrieves a single record of the specified type.
aggregateRecordReads aggregated results according to requested read criteria, for e.g, data origin filter and within a time range.
deleteRecordsByUuidsDeletes one or more records by their identifiers. Deletion of multiple records is executed in a single transaction - if one fails, none is deleted.
deleteRecordsByTimeRangeDeletes any record of the given record type in the given time range (automatically filtered to a record belonging to the calling application). Deletion of multiple records is executed in a transaction - if one fails, none is deleted.