Added in API level 34

AggregateRecordsGroupedByPeriodResponse


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

Class to represent the response from HealthConnectManager#aggregateGroupByPeriod

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.

LocalDateTime

LocalDateTime

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(): LocalDateTime
Return
LocalDateTime End LocalDateTime of the window for the underlying aggregation This value cannot be null.

getStartTime

Added in API level 34
fun getStartTime(): LocalDateTime
Return
LocalDateTime Start LocalDateTime 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.