ReadRecordsRequestUsingIds.Builder


public static final class ReadRecordsRequestUsingIds.Builder
extends Object

java.lang.Object
   ↳ android.health.connect.ReadRecordsRequestUsingIds.Builderandroid.health.connect.datatypes.Record>


Builder class for ReadRecordsRequestUsingIds

Summary

Public constructors

Builder(Class recordType)

Public methods

Builder addClientRecordId(String clientRecordId)

Add a client id to the read request.

Builder addId(String id)

Add an UUID to the read request.

ReadRecordsRequestUsingIds build()

Returns Object of ReadRecordsRequestUsingIds

Inherited methods

Public constructors

Builder

Added in API level 34
public Builder (Class 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 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 This value cannot be null.

addId

Added in API level 34
public Builder 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 This value cannot be null.

build

Added in API level 34
public ReadRecordsRequestUsingIds build ()

Returns Object of ReadRecordsRequestUsingIds

Returns
ReadRecordsRequestUsingIds This value cannot be null.