Added in API level 34

AggregateRecordsResponse


class AggregateRecordsResponse<T : Any!>
kotlin.Any
   ↳ android.health.connect.AggregateRecordsResponse

A class representing response for HealthConnectManager#aggregate

Summary

Public methods
T?
get(aggregationType: AggregationType<T>)

MutableSet<DataOrigin!>
getDataOrigins(aggregationType: AggregationType<T>)

Returns a set of DataOrigins for the underlying aggregation record, empty set if the corresponding aggregation doesn't exist and or if multiple records were present.

ZoneOffset?
getZoneOffset(aggregationType: AggregationType<T>)

Public methods

get

Added in API level 34
fun get(aggregationType: AggregationType<T>): T?
Parameters
aggregationType AggregationType<T>: AggregationType for which to get the result This value cannot be null.
Return
T? an aggregation result for aggregationType. * This value may be null.

getDataOrigins

Added in API level 34
fun getDataOrigins(aggregationType: AggregationType<T>): MutableSet<DataOrigin!>

Returns a set of DataOrigins for the underlying aggregation record, empty set if the corresponding aggregation doesn't exist and or if multiple records were present.

Parameters
aggregationType AggregationType<T>: This value cannot be null.
Return
MutableSet<DataOrigin!> This value cannot be null.

getZoneOffset

Added in API level 34
fun getZoneOffset(aggregationType: AggregationType<T>): ZoneOffset?
Parameters
aggregationType AggregationType<T>: This value cannot be null.
Return
ZoneOffset? ZoneOffset for the underlying aggregation record, null if the corresponding aggregation doesn't exist and or if multiple records were present.