Added in API level 34

RecordIdFilter

open class RecordIdFilter
kotlin.Any
   ↳ android.health.connect.RecordIdFilter

A class to represent filtering based on record id

Summary

Public methods
open static RecordIdFilter
fromClientRecordId(recordType: Class<out Record!>, clientRecordId: String)

Creates an instance of Record id filter based on client record id.

open static RecordIdFilter
fromId(recordType: Class<out Record!>, id: String)

Creates an instance of Record id filter based on record id.

open String?

open String?

open Class<out Record!>

Public methods

fromClientRecordId

Added in API level 34
open static fun fromClientRecordId(
    recordType: Class<out Record!>,
    clientRecordId: String
): RecordIdFilter

Creates an instance of Record id filter based on client record id.

Parameters
recordType Class<out Record!>: Record class for which the client record id must be set. This value cannot be null.
clientRecordId String: Client identifier that was set while inserting the record. This value cannot be null.
Return
RecordIdFilter Object of RecordIdFilter This value cannot be null.

fromId

Added in API level 34
open static fun fromId(
    recordType: Class<out Record!>,
    id: String
): RecordIdFilter

Creates an instance of Record id filter based on record id.

Parameters
recordType Class<out Record!>: Record class for which the id must be set. This value cannot be null.
id String: Identifier generated by the platform and returned by android.health.connect.HealthConnectManager#insertRecords This value cannot be null.
Return
RecordIdFilter Object of RecordIdFilter This value cannot be null.

getClientRecordId

Added in API level 34
open fun getClientRecordId(): String?
Return
String? Client record identifier This value may be null.

getId

Added in API level 34
open fun getId(): String?
Return
String? Identifier given by the platform This value may be null.

getRecordType

Added in API level 34
open fun getRecordType(): Class<out Record!>
Return
Class<out Record!> Record class for this identifier This value cannot be null.