Health Data Store

Samsung Health Android SDK provides the health data store to access health data with the user’s consent. Data in the Samsung Health’s health data store can be shared with other partner apps also.

Figure: Samsung Health data store

Preparing Data Access

An application needs to initialize the health data service, connect to the health data store, and acquire data permission to access the health data store’s data. The following figure shows a basic flow and main APIs for working with Samsung Health.

Figure: Flow for data access

In the connection failure case, all exceptions should be handled clearly with a proper message to the user. It helps to prevent unexpected operations on your application. For detailed code, see:

Health Data Query

HealthDataResolver helps to access the health data store’s data with APIs of the following figure.

Figure: Health data query

All queries except inserting data can be requested with the filter to set the target range for a query. And a data query is sent asynchronously or synchronously.

Asynchronous query is used usually and you can select one of methods for your need. See the following examples for more information.

The query result is retrieved as the following table.

Request Result
read() ReadResult
aggregate() AggregateResult
Table: Data request and its result

See data query snippets in API Reference.


HealthDataResolver.Filter is very useful to clear the data range for reading, updating, and aggregating health data. Multiple filters can be combined with:

  • and()

  • or()

See more descriptions in API Reference.

Data Normalization

The health data is stored based on the normalized unit as defined in International System of Unit (SI) in the following table.

  • Item Unit
    Height cm
    Weight kg
    Temperature Celsius
    Blood glucose mmol/L
    Blood pressure mmHg
    HbA1c %
    SpO2 %
  • Item Unit
    Calorie kcal
    Speed m/s
    Distance meter
    Time millisecond
    Water intake ml
    Caffeine intake mg
Table: International System of Unit

It enables your application to read health data without the specific unit. It means that you need to be careful to unify the data units when you insert health data to the health data store. HealthDataUnit helps to convert data value between different units.