Stay organized with collections
Save and categorize content based on your preferences.
ReadRecordsRequestUsingIds
class ReadRecordsRequestUsingIds<T : Record!> : ReadRecordsRequest<T>
A request class to represent request based on RecordIdFilters
for android.health.connect.HealthConnectManager#readRecords(android.health.connect.ReadRecordsRequest,java.util.concurrent.Executor,android.os.OutcomeReceiver)
A RecordIdFilter
can be constructed with either record ID
or client record ID
. However, it's worth noting that only reading with own client record IDs is allowed, using client record IDs to read records inserted by another app will return no result.
Summary
Public methods
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,["# ReadRecordsRequestUsingIds\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nReadRecordsRequestUsingIds\n==========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/health/connect/ReadRecordsRequestUsingIds \"View this page in Java\") \n\n```\nclass ReadRecordsRequestUsingIds\u003cT : Record!\u003e : ReadRecordsRequest\u003cT\u003e\n```\n\n|---|---|--------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [android.health.connect.ReadRecordsRequest](/reference/kotlin/android/health/connect/ReadRecordsRequest)\\\u003cT\\\u003e ||\n| | ↳ | [android.health.connect.ReadRecordsRequestUsingIds](#) |\n\nA request class to represent request based on [RecordIdFilters](/reference/kotlin/android/health/connect/RecordIdFilter) for [android.health.connect.HealthConnectManager#readRecords(android.health.connect.ReadRecordsRequest,java.util.concurrent.Executor,android.os.OutcomeReceiver)](/reference/kotlin/android/health/connect/HealthConnectManager#readRecords(android.health.connect.ReadRecordsRequest,%20java.util.concurrent.Executor,%20android.os.OutcomeReceiver))\n\nA [RecordIdFilter](/reference/kotlin/android/health/connect/RecordIdFilter) can be constructed with either [record ID](/reference/kotlin/android/health/connect/RecordIdFilter#fromId(java.lang.Class,%20kotlin.String)) or [client record ID](/reference/kotlin/android/health/connect/RecordIdFilter#fromClientRecordId(java.lang.Class,%20kotlin.String)). However, it's worth noting that only reading with own client record IDs is allowed, using client record IDs to read records inserted by another app will return no result.\n\nSummary\n-------\n\n| Nested classes ||\n|---|------------------------------------------------------------------------------------------------------------------------------------------|\n| | [Builder](/reference/kotlin/android/health/connect/ReadRecordsRequestUsingIds.Builder) Builder class for [ReadRecordsRequestUsingIds](#) |\n\n| Public methods ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|\n| [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\\\u003c[RecordIdFilter](/reference/kotlin/android/health/connect/RecordIdFilter)!\\\u003e | [getRecordIdFilters](#getRecordIdFilters())`()` Returns List of RecordId |\n\n| Inherited functions ||\n|---|---|\n| From class [ReadRecordsRequest](/reference/kotlin/android/health/connect/ReadRecordsRequest) |--------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Class](../../../java/lang/Class.html#)\u003cT\u003e | [getRecordType](/reference/kotlin/android/health/connect/ReadRecordsRequest#getRecordType())`()` Returns record type on which read is to be performed \u003cbr /\u003e | ||\n\nPublic methods\n--------------\n\n### getRecordIdFilters\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getRecordIdFilters(): MutableList\u003cRecordIdFilter!\u003e\n```\n\nReturns List of RecordId\n\n| Return ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|\n| [MutableList](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)\u003c[RecordIdFilter](/reference/kotlin/android/health/connect/RecordIdFilter)!\u003e | This value cannot be `null`. |"]]