ReadRecordsRequestUsingIds.Builder

public static final class ReadRecordsRequestUsingIds.Builder
extends Object

java.lang.Object
   ↳ android.health.connect.ReadRecordsRequestUsingIds.Builder<T extends android.health.connect.datatypes.Record>


Builder class for ReadRecordsRequestUsingIds

Summary

Public constructors

Builder(Class<T> recordType)

Public methods

Builder<T> addClientRecordId(String clientRecordId)

Add a client id to the read request.

Builder<T> addId(String id)

Add an UUID to the read request.

ReadRecordsRequestUsingIds<T> build()

Returns Object of ReadRecordsRequestUsingIds

Inherited methods

Public constructors

Builder

Added in API level 34
public Builder (Class<T> recordType)

Parameters
recordType Class: Record class for which the id is being set This value cannot be null.

Public methods

addClientRecordId

Added in API level 34
public Builder<T> addClientRecordId (String clientRecordId)

Add a client id to the read request.

The maximum number of ids in a single ReadRecordsRequestUsingIds that Health Connect accepts is 5000. The limit includes all ids and clientIds.

Parameters
clientRecordId String: identifier that was set while inserting the record This value cannot be null.

Returns
Builder<T> This value cannot be null.

addId

Added in API level 34
public Builder<T> addId (String id)

Add an UUID to the read request.

The maximum number of ids in a single ReadRecordsRequestUsingIds that Health Connect accepts is 5000. The limit includes all ids and clientIds.

Parameters
id String: Identifier generated by the platform and returned by HealthConnectManager.insertRecords(List, Executor, OutcomeReceiver) This value cannot be null.

Returns
Builder<T> This value cannot be null.

build

Added in API level 34
public ReadRecordsRequestUsingIds<T> build ()

Returns Object of ReadRecordsRequestUsingIds

Returns
ReadRecordsRequestUsingIds<T> This value cannot be null.