Skip to content

Galaxy Watch Package

Galaxy Watch

The GalaxyWatchCollector package enables data collection from Samsung Galaxy Watch devices (4 or higher) using the Samsung Privileged Health SDK. To use our package and the included Modules, you need to request the Priviledged Health SDK from Samsung.

Feature Description
Acceleration data 25 Hz, 300 samples every 12 seconds.
Green PPG data 300 points every 12 seconds. Includes a status code indicating the success of the measurement.
Heart rate 1Hz, 1 sample point per second if the watch display is on, otherwise 600 points every 10 minutes. Includes status code indicating the success of the measurement. Contains inter beat intervals (IBI).
Oxygen saturation Freely configurable sampling schedule (periodically, during certain times, multiple times a day, ...), one measurement takes around 20-60 seconds.
Battery life 3.5 days on a Galaxy Watch 5 pro, when using CLAID to collect acceleration and heart rate data. With continuous oxygen saturation measurements around 1.5 days. Make sure to disable all unused features of the Watch ([see below](#optimizing-battery-lifetime)).
Reliability We successfully collected data uninterruptedly for 30+ days.

Compatibility:

  • Android/WearOS:
  • iOS:

Note: You can also use CLAID for data collection on the Galaxy Watches without the Priviledged Health SDK, e.g., using CLAID's regular AccelerometerModule and HeartRateModule. In that case, you do not need this package. However this will drain the battery very fast (recording accelerometer data this way only lasts for 4 hours before the battery runs out). Using the Priviledged Health SDK drastically improves the battery life during data colleciton.

Installation

Because the Samsung Priviledged Health SDK is closed-source, we have to keep the CLAID Galaxy Watch package closed-source as well. You can reveice the package on request from us, if you can show proof that you have received access to the Priviledged Health SDK from Samsung.

We will then provide you with CLAID Developer credentials for the Galaxy Watch Package. Once you received the credentials, set up the CLAID developer account for your App or system. Afterward, you can install the package using the instructions below:

Installing the Galaxy Watch package on WearOS from the CLAID developer repository

The CLAID Galaxy Watch Package is a package only for WearOS. Thus, this package is only available for WearOS, not Android!.

To install the package, you need to have install the CLAID developer credentials. Afterward, put the following into the dependencies (build.gradle) of your App. If you are unsure, check how to install packages from the developer repo.

implementation 'claid_developers.ch.claid:galaxy_watch_package:+'

Included Modules

This package includes one Module, the GalaxyWatchCollector, which can be used to collect data available via the Samsung Priviledged Health SDK on a Samsung Galaxy Watch.

GalaxyWatchCollector

The GalaxyWatchCollector uses the SDK to perform measurements on the Galaxy Watch. It can collect data provided by the Samsung SDK. For usage examples, see below.

Properties and Channels

The GalaxyWatchCollector has the following properties:

Properties
  • enableAccelerometer: boolean | Indicating whether to activate accelerometer measurements
  • enableHeartRate: boolean | Indicating whether to activate heart rate measurements
  • enableGreenPPG: boolean | Indicating whether to activate raw green PPG measurements
  • oxygenSaturationMeasurementSchedule: Schedule | Precise times or intervalls when to measure oxygen saturation data

The GalaxyWatchCollector has the following channels:

Note
  • Input Channels:
    • None
  • Output Channels:
    • AccelerationData: Channel with data type AccelerationData, collected data is posted every 2 minutes
    • HeartRateData: Channel with data type HeartRateData, collected data is posted every 10 minutes when watch display is off, every second otherwise
    • GreenPPGData: Channel with data type GreenPPGData, collected data is posted every 2 minutes
    • OxygenSaturationData: Channel with data type OxygenSaturationData, collected data is posted according to measurement schedule

Usage

You can configure the GalaxyWatchCollector Module to precisely enable or disable certain measurements. Simply combine the configuration for all modalities you require. Check out the configuration snipptes for individual modalities below.

Activating acceleration measurements

Acceleration data is collected with a fixed sampling rate of 25Hz. The sampling frequency is defined by the Priviledged Health SDK and cannot be changed. To activate acceleration data measurements, check out the config below for reference:

Config for activating acceleration data measurements
"hosts": [{
    "hostname": "your_host",
    "modules": [
        {
            "type": "GalaxyWatchCollector",
            "id": "GalaxyWatchCollector",
            "output_channels": {
                "AccelerationData" : "Channel_Name_for_Acceleration_Data"
            }
            "properties": {
                "enableAccelerometer" : true
            }
        }
    ]
}]

Activating heart rate measurements

Heart rate data is collected with a fixed sampling rate of 1Hz. The sampling frequency is defined by the Priviledged Health SDK and cannot be changed. To activate heart rate data measurements, check out the config below for reference:

Config for activating heart rate data measurements
"hosts": [{
    "hostname": "your_host",
    "modules": [
        {
            "type": "GalaxyWatchCollector",
            "id": "GalaxyWatchCollector",
            "output_channels": {
                "HeartRateData" : "Channel_Name_for_Heartrate_Data"
            }
            "properties": {
                "enableHeartRate" : true
            }
        }
    ]
}]

Activating GreenPPG measurements

Green ppg data is collected with a fixed sampling rate of 25Hz. The sampling frequency is defined by the Priviledged Health SDK and cannot be changed. To activate green ppg data measurements, check out the config below for reference:

Config for activating heart rate data measurements
"hosts": [{
    "hostname": "your_host",
    "modules": [
        {
            "type": "GalaxyWatchCollector",
            "id": "GalaxyWatchCollector",
            "output_channels": {
                "GreenPPGData" : "Channel_Name_for_GreenPPGData_Data"
            }
            "properties": {
                "enableGreenPPG" : true
            }
        }
    ]
}]

Activating Oxygen saturation measurements

Oxygen saturation data can be measured according to a freely configurable Schedule. You can configure the Schedule to measure at certain times of the day, periodically, during the night etc. Check out the linked documentation for Schedule for reference.

To activate oxygen saturation measurements, define a Schedule. Here is an example:

Config for activating heart rate data measurements

The following example defines a Schedule to measure oxygen saturation data periodically every 5 minutes from 22:00 in the night to 08:00 in the morning.

"hosts": [{
    "hostname": "your_host",
    "modules": [
        {
            "type": "GalaxyWatchCollector",
            "id": "GalaxyWatchCollector",
            "output_channels": {
                "OxygenSaturationData" : "Channel_Name_for_Oxygensaturation_Data"
            }
            "properties": {
                "oxygenSaturationMeasurementSchedule": 
                {
                    "periodic": [{
                        "period_minutes": 5,
                        "only_active_between_time_frame":
                        {
                            "start_time_of_day": 
                            {
                                "hour": 22
                            },
                            "stop_time_of_day": 
                            {
                                "hour": 8,
                                "minute": 00
                            }
                        }
                    }]
                }                
            }
        }
    ]
}]

Example: Recording acceleration and heart rate data using DataSaverModules

Just to help you get started, here is an example configuration for recording acceleration and heart rate data to binary files using two DataSaverModules:

Recording acceleration and heart rate data to binary files

The following is an example config for recording acceleration data and heart rate data to binary files.

  • One file is created every hour ("%1H")
  • Files are stored in one folder per day, i.e., 24 files per folder
    {
        "hosts": 
        [
            {
                "hostname": "your_host",
                "modules": 
                [
                    {
                        "type": "GalaxyWatchCollector",
                        "id": "GalaxyWatchCollector",
                        "input_channels": {},
                        "output_channels": {
                            "AccelerationData" : "WatchAccelerationData",
                            "HeartRateData" : "WatchHeartRateData",
                        },
                        "properties": {
                            "enableAccelerometer" : true,
                            "enableHeartRate" : true,
                        }
                    },
                    {
                        "type": "DataSaverModule",
                        "id": "AccelerationSaverModule",
                        "input_channels": {"DataChannel" :  "WatchAccelerationData"},
                        "output_channels": {},
                        "properties": {
                            "storagePath": "%media_dir/files",
                            "fileNameFormat": "%d.%m.%y/acceleration_data_%d.%m.%y_%1H.binary",
                            "fileType": "batch_binary"
                        }
                    },
                    {
                        "type": "DataSaverModule",
                        "id": "HeartRateSaverModule",
                        "input_channels": {"DataChannel" :  "WatchHeartRateData"},
                        "output_channels": {},
                        "properties": {
                            "storagePath": "%media_dir/files",
                            "fileNameFormat": "%d.%m.%y/heart_rate_data_%d.%m.%y_%1H.binary",
                            "fileType": "batch_binary"
                        }
                    },
                ]
            }
        ]
    }
    

An example configuration for the GalaxyWatchCollector looks as follows:

Optimizing battery lifetime

To optimize battery lifetime to keep collecting data as long as possible, make sure to turn off every feature of the smartwatch which is not required:

  • Turn off Wifi (most crucial to battery life)
  • Turn off automatic Wifi in the developer settings (otherwise Wifi will be enabled automatically at some point)
  • Turn off Bluetooth
  • Turn off NFC
  • Turn off location and GPS
  • Turn off automatic workout detection in the Samsung Health App
  • Turn off automatic stress detection, pulse and heart rate measurements in the Samsung Health App
  • Turn off oxygen saturation measurements over night in the Samsung Health App