Added in API level 34

Builder


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

Summary

Public constructors
Builder(timeRangeFilter: TimeRangeFilter)

Public methods
AggregateRecordsRequest.Builder<T>
addAggregationType(aggregationType: AggregationType<T>)

AggregateRecordsRequest.Builder<T>
addDataOriginsFilter(dataOriginsFilter: DataOrigin)

Adds dataOriginsFilter to the set of DataOrigin to filter for this aggregation.

AggregateRecordsRequest<T>

Public constructors

Builder

Added in API level 34
Builder(timeRangeFilter: TimeRangeFilter)
Parameters
timeRangeFilter TimeRangeFilter: Time range b/w which the aggregate operation is to be performed

Filters applies to all the aggregate requests. This value cannot be null.

Public methods

addAggregationType

Added in API level 34
fun addAggregationType(aggregationType: AggregationType<T>): AggregateRecordsRequest.Builder<T>
Parameters
aggregationType AggregationType<T>: AggregationType to aggregate. This value cannot be null.
Return
AggregateRecordsRequest.Builder<T> This value cannot be null.

addDataOriginsFilter

Added in API level 34
fun addDataOriginsFilter(dataOriginsFilter: DataOrigin): AggregateRecordsRequest.Builder<T>

Adds dataOriginsFilter to the set of DataOrigin to filter for this aggregation.

If not set data from all data origins will be considered for this operation

Parameters
dataOriginsFilter DataOrigin: This value cannot be null.
Return
AggregateRecordsRequest.Builder<T> This value cannot be null.

build

Added in API level 34
fun build(): AggregateRecordsRequest<T>
Return
AggregateRecordsRequest<T> Object of AggregateRecordsRequest This value cannot be null.