The Samsung Health Data SDK supports Android smartphones including non-Samsung Android smartphones.
SDK content
Content
Description
/docs
API Reference Programming Guide
/libs
SDK’s library. Import it in your app project. - samsung-health-data-api.aar
/sample-code
App project including sample codes. It’s project name is: - HealthDiary
/tool
DataViewer. It displays saved health data in the Samsung Health app.
Features
Samsung Health Data SDK enable an app to access Samsung Health’s selected data.
Health data store
An app can read or aggregate the following data with the SDK’s APIs. The user’s health data is kept secured in the health data store. Available data operators can be different for each data type.
Active calories burned goal
Active time goal
Activity summary
Blood glucose
Blood oxygen
Blood pressure
Body composition
Body temperature
Energy score
Exercise with exercise location
Floors climbed
Heart rate
Nutrition
Nutrition goal
Skin temperature
Sleep
Sleep goal
Steps
Step goal
Water intake
Water intake goal
User profile
Data permission
The use’s data can be accessed after getting the user’s consent clearly.
Data access
Android apps using the Samsung Health Data SDK can read, insert, update, or delete data within the scope of user consent.
Device manager
Saved health data in Samsung Health can be from various connected devices like a Galaxy Watch, Galaxy Ring and a weight scale. DeviceManager provides source device information of saved health data in the Samsung Health’s data store.
Restrictions
Samsung Health Data SDK requires Samsung Health v6.30.2 or later version installation.
Samsung Health runs on devices with Android 10 (API level 29) or above. It is available on all Samsung smartphones and also non-Samsung Android smartphones.
The SDK doesn’t support an emulator.
Measured data by Samsung Health Data SDK is for fitness and wellness only, not for the diagnosis or treatment of any medical condition.
Changes
[New]
Data type
The following data type has been added.
BodyTemperatureType
Operations for reading, inserting, updating and deleting data, as well as reading changes are supported.
Property
The following property has been added to the ExerciseSession class.
vo2Max
Enum
A new accessory type has been added to the AccessoryType class.
THERMOMETER
The following predefined exercise types have been added to the ExerciseType.PredefinedExerciseType class.
OPEN_WATER_SWIMMING
ZUMBA
Data operations
BloodOxygenType
Inserting, updating, and deleting operations are supported.
ExerciseType
Inserting, updating, and deleting operations are supported.
FloorsClimbedType
Reading, inserting, updating, and deleting, as well as reading changes operations are supported.
SleepType
Inserting, updating, and deleting operations are supported.
Only SLEEP_SCORE is not writable.
[Changed]
Nullable properties
The following properties have been updated to be nullable:
swimmingIntervals
totalDistance
totalDuration
Predefined exercise types
The following predefined exercise types of the ExerciseType.PredefinedExerciseType class have been changed.
BIKING from BIKE
ICE_HOKEY from ICE_HOKING
JUMP_ROPE from ROPE_SKIPPING
POOL_SWIMMING from SWIMMING
SNORKELING from SNORKELLING
SOCCER from FOOTBALL
STATIONARY_BIKING from EXERCISE_BIKE
STAIR_CLIMBING from FLOOR_CLIMB
STAIR_CLIMBING_MACHINE from STAIR_MACHINE
OTHER from OTHER_WORKOUT
Developer mode menu name
From version 6.30 of the Samsung Health app, the name of the developer mode menu, which is a feature of the Samsung Health Data SDK, has been changed to 'Developer Mode (Samsung Health Data SDK).
[New]
Data type
The following data type has been added. Reading data and retrieving changed data is available.
EnergyScoreType
Inserting, updating, and deleting data
Inserting, updating, and deleting data has been supported for the following data types.
Body composition
Blood glucose
Blood pressure
Heart rate
Nutrition
Water intake
The following APIs have been added in com.samsung.android.sdk.health.data.HealthDataStore for inserting data.
The com.samsung.android.sdk.health.data.data.HealthDataPoint.Builder class has been added to insert or update health data.
The following classs have been added in com.samsung.android.sdk.health.data.request.
InsertDataRequest
UpdateDataRequest
DeleteDataRequest
Access code
Developer mode's access code
To insert, update, or delete data when testing apps, the access code is required on the developer mode page. The access code can be obtained by requesting partnership.
Device manager
The following APIs have been added in com.samsung.android.sdk.health.data.DeviceManager to register health devices and getting device information.
The com.samsung.android.sdk.health.data.request.DeviceRegistrationRequest has been added to register a health device.
The following classes and APIs have been added related to the accessory device.
com.samsung.android.sdk.health.data.device
AccessoryType
Device.AccessoryBuilder
Device.Companion.accessoryBuilder()
Device.isOf(type:AccessoryType)
Others
The following APIs have been added in com.samsung.android.sdk.health.data.request.IdFilter.Builder.
addClientDataId(clientDataId:String)
fromClientDataId(clientDataId:String)
The following error code has been added in com.samsung.android.sdk.health.data.error.
ERR_NO_OWNERSHIP_TO_WRITE
The following property has been added in the BloodGlucoseType.
MEDICATION_TAKEN
[Changed]
The BloodGlucoseType.MEAL_STATUS property has been changed to be required.
The first SDK release.
[New]
Reading the following Samsung Health's data is available.
Activity summary
Active calories burned goal
Active time goal
Blood glucose
Blood oxygen
Blood pressure
Body composition
Exercise
Exercise location
Floor climbed
Heart rate
Nutrition
Nutrition goal
Skin temperature
Sleep
Sleep goal
Steps
Step goal
Water intake
Water intake goal
User profile
Data permission
Requesting data permissions is required to read health data.
Device manager
The device type like a Galaxy Watch, Galaxy Ring and a weight scale can be known with the device manager.
Developer mode
For development and debugging purposes, developers can activate the developer mode to interact with the Samsung Health Data SDK within their Android apps.
To distribute the app using the Samsung Health Data SDK, request partnership. You can find more information in the SDK process.
Manage Your Cookies
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
.samsungdeveloperconference.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
LinkedIn
.ads.linkedin.com, .linkedin.com
Advertising Cookies
These cookies gather information about your browser habits. They remember that
you've visited our website and share this information with other organizations such
as advertisers.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Preferences Submitted
You have successfully updated your cookie preferences.