Stay organized with collections
Save and categorize content based on your preferences.
Builder
class Builder<T : Any!>
Summary
Public constructors
Builder
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
addDataOriginsFilter
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 . |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# AggregateRecordsRequest.Builder\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nBuilder\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/health/connect/AggregateRecordsRequest.Builder \"View this page in Java\") \n\n```\nclass Builder\u003cT : Any!\u003e\n```\n\n|---|-------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.health.connect.AggregateRecordsRequest.Builder](#) |\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Builder](#Builder(android.health.connect.TimeRangeFilter))`(`timeRangeFilter:` `[TimeRangeFilter](/reference/kotlin/android/health/connect/TimeRangeFilter)`)` \u003cbr /\u003e |\n\n| Public methods ||\n|--------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AggregateRecordsRequest.Builder](#)\\\u003cT\\\u003e | [addAggregationType](#addAggregationType(android.health.connect.datatypes.AggregationType))`(`aggregationType:` `[AggregationType](/reference/kotlin/android/health/connect/datatypes/AggregationType)\u003cT\u003e`)` \u003cbr /\u003e |\n| [AggregateRecordsRequest.Builder](#)\\\u003cT\\\u003e | [addDataOriginsFilter](#addDataOriginsFilter(android.health.connect.datatypes.DataOrigin))`(`dataOriginsFilter:` `[DataOrigin](/reference/kotlin/android/health/connect/datatypes/DataOrigin)`)` Adds `dataOriginsFilter` to the set of [DataOrigin](/reference/kotlin/android/health/connect/datatypes/DataOrigin) to filter for this aggregation. |\n| [AggregateRecordsRequest](/reference/kotlin/android/health/connect/AggregateRecordsRequest)\\\u003cT\\\u003e | [build](#build())`()` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### Builder\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nBuilder(timeRangeFilter: TimeRangeFilter)\n```\n\n| Parameters ||\n|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `timeRangeFilter` | [TimeRangeFilter](/reference/kotlin/android/health/connect/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`. |\n\nPublic methods\n--------------\n\n### addAggregationType\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun addAggregationType(aggregationType: AggregationType\u003cT\u003e): AggregateRecordsRequest.Builder\u003cT\u003e\n```\n\n| Parameters ||\n|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `aggregationType` | [AggregationType](/reference/kotlin/android/health/connect/datatypes/AggregationType)\\\u003cT\\\u003e: [AggregationType](/reference/kotlin/android/health/connect/datatypes/AggregationType) to aggregate. This value cannot be `null`. |\n\n| Return ||\n|-----------------------------------------|------------------------------|\n| [AggregateRecordsRequest.Builder](#)\u003cT\u003e | This value cannot be `null`. |\n\n### addDataOriginsFilter\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun addDataOriginsFilter(dataOriginsFilter: DataOrigin): AggregateRecordsRequest.Builder\u003cT\u003e\n```\n\nAdds `dataOriginsFilter` to the set of [DataOrigin](/reference/kotlin/android/health/connect/datatypes/DataOrigin) to filter for this aggregation.\n\nIf not set data from all data origins will be considered for this operation\n\n| Parameters ||\n|---------------------|-----------------------------------------------------------------------------------------------------------|\n| `dataOriginsFilter` | [DataOrigin](/reference/kotlin/android/health/connect/datatypes/DataOrigin): This value cannot be `null`. |\n\n| Return ||\n|-----------------------------------------|------------------------------|\n| [AggregateRecordsRequest.Builder](#)\u003cT\u003e | This value cannot be `null`. |\n\n### build\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun build(): AggregateRecordsRequest\u003cT\u003e\n```\n\n| Return ||\n|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|\n| [AggregateRecordsRequest](/reference/kotlin/android/health/connect/AggregateRecordsRequest)\u003cT\u003e | Object of [AggregateRecordsRequest](/reference/kotlin/android/health/connect/AggregateRecordsRequest) This value cannot be `null`. |"]]