Samsung Health SDK for Android helps Samsung Health's partners to share health data safely and to create useful health applications. Samsung Health has a health data store where its data can be shared with other partner apps after the user's consent. It supports Android devices with Marshmallow 6.0 including non-Samsung devices.
Refer to the following table terms for Samsung Health SDK for Android.
The health data framework of Samsung Health SDK for Android has the following features:
Health Data Store
Health Data Type
The SDK's health data framework is designed to provide safe access of its data and to have a seamless health service to the user. The following figure shows the health data framework's architecture.
The health data framework is included in Samsung Health. Applications can access the user's data that are stored in Samsung Health through the SDK. It keeps the user's health data safely. Health data from various source devices having pedometer, accelerator, or heart rate sensors are inserted to the health data framework with the unified data unit. The data can be read by the SDK. Updating or deleting data is available if the app inserted the data.
The figure above shows the class and interface relationships in Health Data. Detailed descriptions for each class and interface are in the API Reference.
It handles the connection to the data storage of the device. It receives its connection result with HealthDataStore.ConnectionListener. Most requests require the connection to the health data store.
The health data framework provides classes and interfaces to insert, read, update, or delete the data. HealthDataResolver is a central class to handle the health data. It sends a data request with related request interfaces.
The query result can be received immediately with HealthDataHolder.BaseResult, HealthDataResolver.ReadResult or HealthDataResolver.AggregateResult. Or it can be received asynchronously with HealthResultHolder.ResultListener. See Health Data Store for more information.
Application developers can use platform-defined data types that Samsung Health SDK for Android provides. See Health Data Type for more information. Especially HealthConstants.Common, the base interface of predefined data types, contains the following mandatory properties for health data.
The health data can be accessed with the user's consent. The following figure shows the relationship between classes and interfaces related to HealthPermissionManager. It requests permissions to the user with HealthPermissionManager.PermissionKey to read or write for the specific health data type. The permission result can be received synchronous or asynchronously. See Privacy for more information.
The SDK's Health Data library provides the following package:
Main interfaces and classes in the library are described in the following table. See the API reference for details.