HealthConnectManager

Constructors

Link copied to clipboard
constructor(context: Context)

Functions

Link copied to clipboard
open suspend override fun isAuthorized(readTypes: List<HealthDataType>, writeTypes: List<HealthDataType>): Result<Boolean>
Link copied to clipboard
open override fun isAvailable(): Result<Boolean>
Link copied to clipboard
open suspend override fun isRevokeAuthorizationSupported(): Result<Boolean>
Link copied to clipboard
open suspend override fun isStoragePermissionGranted(): Boolean
Link copied to clipboard
open suspend override fun readData(startTime: Instant, endTime: Instant, type: HealthDataType): Result<List<HealthRecord>>
Link copied to clipboard
open suspend override fun requestAuthorization(readTypes: List<HealthDataType>, writeTypes: List<HealthDataType>): Result<Boolean>
Link copied to clipboard
open suspend override fun revokeAuthorization(): Result<Unit>
Link copied to clipboard
open suspend override fun writeData(records: List<HealthRecord>): Result<Unit>

Inserts one or more HealthRecord. Insertion of multiple records is executed in a transaction - if one fails, none is inserted.