HealthDataPoint

A HealthDataPoint is an individual record of health data saved in the Samsung Health app's data store.

It has the following basic properties. Other fields vary according to the DataType.

PropertyDescription
uidThe data's unique identifier assigned by Samsung Health.
startTimeThe start time of measurement, specified as Instant in milliseconds.
endTimeThe end time of measurement, specified as Instant in milliseconds.
zoneOffsetThe ZoneOffset for startTime and endTime.
dataSourceThe data's source information including the application package name and which device's ID.
updateTimeThe timestamp representing the last update of the data in the Samsung Health app's data store, specified as Instant in milliseconds. If no data update has occurred, it remains the same as startTime.
clientDataIdThe optional data ID supplied by the app using Samsung Health Data SDK.
clientVersionThe optional data version supplied by the app using Samsung Health Data SDK.

Since

1.0.0

Types

Link copied to clipboard
class Builder

A builder to create a HealthDataPoint instance.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The optional ID supplied by the client app associated with the data.

Link copied to clipboard

The optional data version supplied by the client app associated with the data.

Link copied to clipboard

The DataSource of the data, including the following information that provided the health data.

Link copied to clipboard

The end time of the data measurement. It is exclusive and specified as Instant in milliseconds.

Link copied to clipboard

The start time of the data measurement. It is inclusive and specified as Instant in milliseconds.

Link copied to clipboard
val uid: String

The unique identifier of the data, assigned at the time of insertion.

Link copied to clipboard

The timestamp representing the last update of the data in the Samsung Health app's data store, specified as Instant in milliseconds. If no data update has occurred, it remains the same as startTime.

Link copied to clipboard

The zone offset for the measured startTime and endTime of this data.

Functions

Link copied to clipboard

Retrieves the end time of the data as a LocalDateTime.

Link copied to clipboard

Retrieves the start time of the data as a LocalDateTime.

Link copied to clipboard
fun <T> getValue(field: Field<T>): T?

Retrieves the value of the specified field.

Link copied to clipboard
fun <T> getValueOrDefault(field: Field<T>, defaultValue: T): T

This is a generic type function, so the class type of the returned object is determined by the input field.

Preferences Submitted

You have successfully updated your cookie preferences.