Stay organized with collections
Save and categorize content based on your preferences.
DeletedLog
class DeletedLog
A change log holds the Metadata.getId()
of a deleted Record. For privacy, only unique identifiers of deleted records are returned.
Clients holding copies of data from Health Connect should keep a copy of these unique identifiers along with their contents. When receiving a DeletedLog
in ChangeLogsResponse
, use the identifiers to delete copy of the data.
Summary
Public methods |
Boolean |
|
String |
Returns record id of the record deleted.
|
Instant |
Returns timestamp when the record was deleted.
|
Int |
|
Public constructors
DeletedLog
DeletedLog(
deletedRecordId: String,
deletedTime: Instant)
Parameters |
deletedRecordId |
String: This value cannot be null . |
deletedTime |
Instant: This value cannot be null . |
Public methods
equals
fun equals(other: Any?): Boolean
Parameters |
obj |
the reference object with which to compare. |
Return |
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getDeletedRecordId
fun getDeletedRecordId(): String
Returns record id of the record deleted.
Return |
String |
This value cannot be null . |
getDeletedTime
fun getDeletedTime(): Instant
Returns timestamp when the record was deleted.
Return |
Instant |
This value cannot be null . |
hashCode
fun hashCode(): Int
Return |
Int |
a hash code value for this object. |
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-08-20 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-08-20 UTC."],[],[],null,["# ChangeLogsResponse.DeletedLog\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nDeletedLog\n==========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/health/connect/changelog/ChangeLogsResponse.DeletedLog \"View this page in Java\") \n\n```\nclass DeletedLog\n```\n\n|---|---------------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.health.connect.changelog.ChangeLogsResponse.DeletedLog](#) |\n\nA change log holds the [Metadata.getId()](../datatypes/Metadata.html#getId()) of a deleted Record. For privacy, only unique identifiers of deleted records are returned.\n\nClients holding copies of data from Health Connect should keep a copy of these unique identifiers along with their contents. When receiving a [DeletedLog](#) in [ChangeLogsResponse](/reference/kotlin/android/health/connect/changelog/ChangeLogsResponse), use the identifiers to delete copy of the data.\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [DeletedLog](#DeletedLog(kotlin.String,%20java.time.Instant))`(`deletedRecordId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `deletedTime:` `[Instant](../../../../java/time/Instant.html#)`)` \u003cbr /\u003e |\n| [DeletedLog](#DeletedLog(kotlin.String,%20kotlin.Long))`(`deletedRecordId:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `deletedTime:` `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` \u003cbr /\u003e |\n\n| Public methods ||\n|------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` \u003cbr /\u003e |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getDeletedRecordId](#getDeletedRecordId())`()` Returns record id of the record deleted. |\n| [Instant](../../../../java/time/Instant.html#) | [getDeletedTime](#getDeletedTime())`()` Returns timestamp when the record was deleted. |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [hashCode](#hashCode())`()` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### DeletedLog\n\nAdded in [API level Baklava](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nDeletedLog(\n deletedRecordId: String, \n deletedTime: Instant)\n```\n\n| Parameters ||\n|-------------------|----------------------------------------------------------------------------------------------------------------|\n| `deletedRecordId` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |\n| `deletedTime` | [Instant](../../../../java/time/Instant.html#): This value cannot be `null`. |\n\n### DeletedLog\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nDeletedLog(\n deletedRecordId: String, \n deletedTime: Long)\n```\n\n**Deprecated:** *Use [DeletedLog(java.lang.String,java.time.Instant)](#DeletedLog(kotlin.String,%20java.time.Instant)).*\n\n| Parameters ||\n|-------------------|----------------------------------------------------------------------------------------------------------------|\n| `deletedRecordId` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): This value cannot be `null`. |\n\nPublic methods\n--------------\n\n### equals\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun equals(other: Any?): Boolean\n```\n\n| Parameters ||\n|-------|---------------------------------------------|\n| `obj` | the reference object with which to compare. |\n\n| Return ||\n|------------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `true` if this object is the same as the obj argument; `false` otherwise. |\n\n### getDeletedRecordId\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getDeletedRecordId(): String\n```\n\nReturns record id of the record deleted.\n\n| Return ||\n|----------------------------------------------------------------------------------|------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | This value cannot be `null`. |\n\n### getDeletedTime\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun getDeletedTime(): Instant\n```\n\nReturns timestamp when the record was deleted.\n\n| Return ||\n|------------------------------------------------|------------------------------|\n| [Instant](../../../../java/time/Instant.html#) | This value cannot be `null`. |\n\n### hashCode\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nfun hashCode(): Int\n```\n\n| Return ||\n|----------------------------------------------------------------------------|------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |"]]