Added in API level 34

Builder


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

Builder class for ReadRecordsRequestUsingIds

Summary

Public constructors
Builder(recordType: Class<T>)

Public methods
ReadRecordsRequestUsingIds.Builder<T>
addClientRecordId(clientRecordId: String)

Add a client id to the read request.

ReadRecordsRequestUsingIds.Builder<T>

Add an UUID to the read request.

ReadRecordsRequestUsingIds<T>

Returns Object of ReadRecordsRequestUsingIds

Public constructors

Builder

Added in API level 34
Builder(recordType: Class<T>)
Parameters
recordType Class<T>: Record class for which the id is being set This value cannot be null.

Public methods

addClientRecordId

Added in API level 34
fun addClientRecordId(clientRecordId: String): ReadRecordsRequestUsingIds.Builder<T>

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.
Return
ReadRecordsRequestUsingIds.Builder<T> This value cannot be null.

addId

Added in API level 34
fun addId(id: String): ReadRecordsRequestUsingIds.Builder<T>

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 android.health.connect.HealthConnectManager#insertRecords This value cannot be null.
Return
ReadRecordsRequestUsingIds.Builder<T> This value cannot be null.

build

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

Returns Object of ReadRecordsRequestUsingIds

Return
ReadRecordsRequestUsingIds<T> This value cannot be null.