Added in API level 34

AggregateRecordsGroupedByDurationResponse


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

Class to represent the response from HealthConnectManager.aggregateGroupByDuration

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.

Instant

Instant

ZoneOffset?
getZoneOffset(aggregationType: AggregationType<T>)

Public methods

get

Added in API level 34
fun get(aggregationType: AggregationType<T>): T?
Parameters
aggregationType AggregationType<T>: This value cannot be null.
Return
T? An aggregation result for aggregationType, and null if one doesn't exist

getDataOrigins

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.

getEndTime

Added in API level 34
fun getEndTime(): Instant
Return
Instant End time of the window for the underlying aggregation This value cannot be null.

getStartTime

Added in API level 34
fun getStartTime(): Instant
Return
Instant Start time of the window for the underlying aggregation 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 or if multiple records were present.