Skip to main content

Health Data Overview (TSHealthBase)

This module provides comprehensive interfaces for managing active health measurements and automatic health monitoring. It enables applications to perform real-time health measurements (heart rate, blood pressure, blood oxygen, stress, temperature, ECG) and configure automatic monitoring schedules with customizable alert thresholds.

Prerequisites

  • Device must be connected and authenticated before starting any measurement or configuration operation
  • Check device capabilities to ensure it supports the desired measurement type
  • Sufficient device battery level for extended measurement sessions
  • Valid measurement parameters must be provided before initiating measurements

Data Models

TSActivityMeasureParam

Active measurement parameters model for controlling health measurement sessions.

PropertyTypeDescription
measureTypeTSActiveMeasureTypeType of measurement to perform (heart rate, blood pressure, blood oxygen, stress, temperature, or ECG). Only one type can be selected at a time.
intervalUInt8Sampling interval in seconds between consecutive measurements. Affects measurement frequency and data granularity.
maxMeasureDurationUInt8Maximum measurement duration in seconds. Measurement stops automatically after this duration. Default is 60 seconds. Set to 0 for continuous measurement until manual stop. Minimum valid value is 15 seconds.

TSAutoMonitorConfigs

Configuration for automatic health monitoring with schedule and alert thresholds.

PropertyTypeDescription
scheduleTSMonitorSchedule *Monitor schedule including enable switch, start/end times in minutes from midnight, and interval between measurements.
alertTSMonitorAlert *Threshold-based alert policy. Unit depends on monitor type (percent for SpO2, bpm for heart rate, mmHg for blood pressure).

TSAutoMonitorHRConfigs

Heart rate specific automatic monitoring configuration with separate alerts for resting and exercise heart rate.

PropertyTypeDescription
scheduleTSMonitorSchedule *Monitor schedule including enable switch, start/end times in minutes from midnight, and interval.
restHRAlertTSMonitorAlert *Threshold-based alert policy for resting heart rate in bpm (beats per minute).
exerciseHRAlertTSMonitorAlert *Threshold-based alert policy for exercise heart rate in bpm (beats per minute).
exerciseHRLimitMaxUInt8Maximum exercise heart rate for zone calculation. Used to calculate heart rate zones (warm-up, fat burning, aerobic, anaerobic, peak). Recommended range 100-220 bpm, typically calculated as 220 - age.

TSAutoMonitorBPConfigs

Blood pressure specific automatic monitoring configuration with separate systolic and diastolic thresholds.

PropertyTypeDescription
scheduleTSMonitorSchedule *Monitor schedule including enable switch, start/end times in minutes from midnight, and interval.
alertTSMonitorBPAlert *Blood pressure threshold-based alert policy with separate systolic and diastolic limits in mmHg (millimeters of mercury).

TSMonitorSchedule

Schedule configuration for automatic monitoring sessions.

PropertyTypeDescription
enabledBOOLIndicates whether the monitoring is enabled. Access via isEnabled getter.
startTimeUInt16Start time in minutes from midnight (e.g., 480 for 8 AM). Valid range is 0-1440 minutes (0:00-24:00).
endTimeUInt16End time in minutes from midnight (e.g., 1200 for 8 PM). Valid range is 0-1440 minutes (0:00-24:00), must be greater than startTime.
intervalUInt16Interval between monitoring in minutes. Must be a multiple of 5 (5, 10, 15, 20, etc.).

TSMonitorAlert

Generic alert configuration with upper and lower threshold limits.

PropertyTypeDescription
enabledBOOLIndicates whether alert checking is enabled. Access via isEnabled getter.
upperLimitUInt16Upper threshold for alert decision. Unit depends on monitor type (percent for SpO2, bpm for heart rate, mmHg for blood pressure).
lowerLimitUInt16Lower threshold for alert decision. Unit depends on monitor type (percent for SpO2, bpm for heart rate, mmHg for blood pressure).

TSMonitorBPAlert

Blood pressure specific alert configuration with separate thresholds for systolic and diastolic pressure.

PropertyTypeDescription
enabledBOOLIndicates whether blood pressure alert checking is enabled. Access via isEnabled getter.
systolicUpperLimitUInt8Upper threshold for systolic blood pressure alert in mmHg.
systolicLowerLimitUInt8Lower threshold for systolic blood pressure alert in mmHg.
diastolicUpperLimitUInt8Upper threshold for diastolic blood pressure alert in mmHg.
diastolicLowerLimitUInt8Lower threshold for diastolic blood pressure alert in mmHg.

TSHealthValueItem

Health value item model representing a single health measurement with timing and value type information.

PropertyTypeDescription
startTimeNSTimeIntervalUnix timestamp (in seconds) indicating when this data record started.
endTimeNSTimeIntervalUnix timestamp (in seconds) indicating when this data record ended.
durationdoubleThe total duration of this data record in seconds. Can be calculated as (endTime - startTime).
valueTypeTSItemValueTypeClassifies sample as Normal raw point, Daily maximum/minimum, or Resting HR. Normal is a raw time-series sample (auto or manual), Max/Min are daily extrema derived from that day's normal samples, Resting is derived by algorithm.

TSHealthDailyModel

Health data model for daily health records with start/end times and duration.

PropertyTypeDescription
startTimeNSTimeIntervalUnix timestamp (in seconds) indicating when this data record started.
endTimeNSTimeIntervalUnix timestamp (in seconds) indicating when this data record ended.
durationdoubleThe total duration of this data record in seconds.

Enumerations

TSActiveMeasureType

Types of health measurements that can be selected.

ValueNameDescription
0TSMeasureTypeNoneNo measurement selected.
1TSMeasureTypeHeartRateReal-time heart rate monitoring.
2TSMeasureTypeBloodOxygenBlood oxygen saturation SpO2 measurement.
3TSMeasureTypeBloodPressureSystolic and diastolic blood pressure measurement.
4TSMeasureTypeStressMental stress level assessment.
5TSMeasureTypeTemperatureBody temperature measurement.
6TSMeasureTypeECGElectrocardiogram recording.

TSItemValueType

Heart rate data type classification distinguishing different types of heart rate records.

ValueNameDescription
0TSItemValueTypeNormalNormal raw point (auto or manual), not a derived statistic.
1TSItemValueTypeMaxDaily maximum derived from normal points of that day.
2TSItemValueTypeMinDaily minimum derived from normal points of that day.
3TSItemValueTypeRestingResting heart rate derived by algorithm based on rest/sleep window data.

TSHealthValueType

Health value type for records stored in health tables.

ValueNameDescription
0TSHealthValueTypeNormalNormal data record.
1TSHealthValueTypeMaxMaximum value record.
2TSHealthValueTypeMinMinimum value record.
3TSHealthValueTypeRestingResting type record (heart rate only).

Callback Types

TSCompletionBlock

void (^)(NSError * _Nullable)

Completion callback block invoked when an operation completes.

Parameters:

  • error (NSError * _Nullable): Error information if operation failed, nil if successful.

TSMeasureDataBlock

void (^)(TSHealthValueItem *value)

Callback block that delivers measurement data during a measurement session.

Parameters:

  • value (TSHealthValueItem *): Health value model containing measurement data with timing information.

Measurement Data Change Callback

void (^)(TSHealthValueItem * _Nullable realtimeData, NSError * _Nullable error)

Callback block invoked when measurement data is received during an active measurement.

Parameters:

  • realtimeData (TSHealthValueItem * _Nullable): Real-time measurement data from device, nil if error occurs.
  • error (NSError * _Nullable): Error information if data reception fails, nil if successful.

Measurement End Callback

void (^)(BOOL isFinished, NSError * _Nullable error)

Callback block invoked when a measurement session ends.

Parameters:

  • isFinished (BOOL): Whether the measurement ended normally (YES) or was interrupted (NO).
  • error (NSError * _Nullable): Error information if measurement ended abnormally, nil if normal end.

API Reference

Start health measurement with custom parameters

Initiates a health measurement session based on provided parameters with custom sampling interval and maximum duration.

+ (void)startMeasureWithParam:(TSActivityMeasureParam *)measureParam 
completion:(TSCompletionBlock)completion;

Parameters:

NameTypeDescription
measureParamTSActivityMeasureParam *Measurement parameters including type, interval, and duration.
completionTSCompletionBlockCompletion callback indicating success or failure of starting measurement.

Code Example:

TSActivityMeasureParam *param = [[TSActivityMeasureParam alloc] init];
param.measureType = TSMeasureTypeHeartRate;
param.interval = 5; // 5 seconds sampling interval
param.maxMeasureDuration = 60; // 60 seconds maximum duration

[TSActiveMeasureInterface startMeasureWithParam:param completion:^(NSError * _Nullable error) {
if (error) {
TSLog(@"Failed to start measurement: %@", error.localizedDescription);
} else {
TSLog(@"Heart rate measurement started successfully");
}
}];

Stop ongoing health measurement

Stops the currently active health measurement session and terminates all ongoing data collection.

+ (void)stopMeasureWithParam:(TSActivityMeasureParam *)measureParam completion:(TSCompletionBlock)completion;

Parameters:

NameTypeDescription
measureParamTSActivityMeasureParam *Measurement parameters identifying which measurement to stop.
completionTSCompletionBlockCompletion callback indicating success or failure of stopping measurement.

Code Example:

TSActivityMeasureParam *param = [[TSActivityMeasureParam alloc] init];
param.measureType = TSMeasureTypeHeartRate;

[TSActiveMeasureInterface stopMeasureWithParam:param completion:^(NSError * _Nullable error) {
if (error) {
TSLog(@"Failed to stop measurement: %@", error.localizedDescription);
} else {
TSLog(@"Heart rate measurement stopped successfully");
}
}];

Register measurement data change notification

Registers a notification listener for real-time measurement data received during an active measurement session.

+ (void)registerMeasurement:(TSActivityMeasureParam *)param
dataDidChanged:(void(^)(TSHealthValueItem * _Nullable realtimeData, NSError * _Nullable error))dataDidChanged;

Parameters:

NameTypeDescription
paramTSActivityMeasureParam *Measurement parameters identifying which measurement type to listen for.
dataDidChangedvoid(^)(TSHealthValueItem * _Nullable, NSError * _Nullable)Callback block invoked when measurement data is received. realtimeData contains measurement data on success, error contains failure information.

Code Example:

TSActivityMeasureParam *param = [[TSActivityMeasureParam alloc] init];
param.measureType = TSMeasureTypeHeartRate;

[TSActiveMeasureInterface registerMeasurement:param dataDidChanged:^(TSHealthValueItem * _Nullable realtimeData, NSError * _Nullable error) {
if (error) {
TSLog(@"Data reception error: %@", error.localizedDescription);
} else if (realtimeData) {
TSLog(@"Received heart rate data: value=%@, time=%@", realtimeData.value, @(realtimeData.startTime));
}
}];

Register measurement end notification

Registers a notification listener for measurement session completion events.

+ (void)registerActivityeasureDidFinished:(void(^)(BOOL isFinished, NSError * _Nullable error))didFinished;

Parameters:

NameTypeDescription
didFinishedvoid(^)(BOOL, NSError * _Nullable)Callback block invoked when measurement ends. isFinished indicates normal completion (YES) or interruption (NO). error contains error information if abnormal end.

Code Example:

[TSActiveMeasureInterface registerActivityeasureDidFinished:^(BOOL isFinished, NSError * _Nullable error) {
if (error) {
TSLog(@"Measurement ended with error: %@", error.localizedDescription);
} else if (isFinished) {
TSLog(@"Measurement completed successfully");
} else {
TSLog(@"Measurement was interrupted");
}
}];

Fetch heart rate auto monitor configurations

Retrieves current heart rate auto monitor configurations from the device including monitoring schedule, heart rate alerts, and maximum heart rate for zone calculation.

- (void)fetchHeartRateAutoMonitorConfigsWithCompletion:(void (^)(TSAutoMonitorHRConfigs *_Nullable configs, NSError *_Nullable error))completion;

Parameters:

NameTypeDescription
completionvoid(^)(TSAutoMonitorHRConfigs * _Nullable, NSError * _Nullable)Completion block receiving heart rate monitor configs and error. configs contains current configuration on success, error contains failure information.

Code Example:

[deviceInterface fetchHeartRateAutoMonitorConfigsWithCompletion:^(TSAutoMonitorHRConfigs * _Nullable configs, NSError * _Nullable error) {
if (error) {
TSLog(@"Failed to fetch heart rate config: %@", error.localizedDescription);
} else if (configs) {
TSLog(@"Schedule enabled: %@", configs.schedule.isEnabled ? @"YES" : @"NO");
TSLog(@"Start time: %d, End time: %d", configs.schedule.startTime, configs.schedule.endTime);
TSLog(@"Max exercise HR: %d bpm", configs.exerciseHRLimitMax);
}
}];

Push heart rate auto monitor configuration to device

Sends heart rate auto monitor configuration to the device including monitoring schedule and alert thresholds.

- (void)pushHeartRateAutoMonitorConfig:(TSAutoMonitorHRConfigs *)config
completion:(TSCompletionBlock)completion;

Parameters:

NameTypeDescription
configTSAutoMonitorHRConfigs *Heart rate auto monitor configuration to be set on device.
completionTSCompletionBlockCompletion callback indicating operation result.

Code Example:

TSAutoMonitorHRConfigs *config = [[TSAutoMonitorHRConfigs alloc] init];

// Configure schedule
TSMonitorSchedule *schedule = [[TSMonitorSchedule alloc] init];
schedule.enabled = YES;
schedule.startTime = 480; // 8:00 AM
schedule.endTime = 1200; // 8:00 PM
schedule.interval = 30; // 30 minutes
config.schedule = schedule;

// Configure resting heart rate alert
TSMonitorAlert *restAlert = [[TSMonitorAlert alloc] init];
restAlert.enabled = YES;
restAlert.lowerLimit = 40; // Lower limit
restAlert.upperLimit = 100; // Upper limit
config.restHRAlert = restAlert;

// Configure exercise heart rate alert
TSMonitorAlert *exerciseAlert = [[TSMonitorAlert alloc] init];
exerciseAlert.enabled = YES;
exerciseAlert.lowerLimit = 60;
exerciseAlert.upperLimit = 160;
config.exerciseHRAlert = exerciseAlert;

config.exerciseHRLimitMax = 180; // Max HR for zone calculation (220 - 40)

[deviceInterface pushHeartRateAutoMonitorConfig:config completion:^(NSError * _Nullable error) {
if (error) {
TSLog(@"Failed to push heart rate config: %@", error.localizedDescription);
} else {
TSLog(@"Heart rate monitor config pushed successfully");
}
}];

Fetch blood pressure auto monitor configurations

Retrieves current blood pressure auto monitor configurations from the device including monitoring schedule and systolic/diastolic alert thresholds.

- (void)fetchBloodPressureAutoMonitorConfigsWithCompletion:(void (^)(TSAutoMonitorBPConfigs *_Nullable configs, NSError *_Nullable error))completion;

Parameters:

NameTypeDescription
completionvoid(^)(TSAutoMonitorBPConfigs * _Nullable, NSError * _Nullable)Completion block receiving blood pressure monitor configs and error. configs contains current configuration on success, error contains failure information.

Code Example:

[deviceInterface fetchBloodPressureAutoMonitorConfigsWithCompletion:^(TSAutoMonitorBPConfigs * _Nullable configs, NSError * _Nullable error) {
if (error) {
TSLog(@"Failed to fetch blood pressure config: %@", error.localizedDescription);
} else if (configs) {
TSLog(@"BP monitoring enabled: %@", configs.schedule.isEnabled ? @"YES" : @"NO");
TSLog(@"Systolic alert: %d - %d mmHg", configs.alert.systolicLowerLimit, configs.alert.systolicUpperLimit);
TSLog(@"Diastolic alert: %d - %d mmHg", configs.alert.diastolicLowerLimit, configs.alert.diastolicUpperLimit);
}
}];

Push blood pressure auto monitor configuration to device

Sends blood pressure auto monitor configuration to the device including monitoring schedule and systolic/diastolic alert thresholds.

- (void)pushBloodPressureAutoMonitorConfig:(TSAutoMonitorBPConfigs *)config
completion:(TSCompletionBlock)completion;

Parameters:

NameTypeDescription
configTSAutoMonitorBPConfigs *Blood pressure auto monitor configuration to be set on device.
completionTSCompletionBlockCompletion callback indicating operation result.

Code Example:

TSAutoMonitorBPConfigs *config = [[TSAutoMonitorBPConfigs alloc] init];

// Configure schedule
TSMonitorSchedule *schedule = [[TSMonitorSchedule alloc] init];
schedule.enabled = YES;
schedule.startTime = 420; // 7:00 AM
schedule.endTime = 1260; // 9:00 PM
schedule.interval = 60; // 60 minutes
config.schedule = schedule;

// Configure blood pressure alert thresholds
TSMonitorBPAlert *alert = [[TSMonitorBPAlert alloc] init];
alert.enabled = YES;
alert.systolicUpperLimit = 140; // Systolic upper limit
alert.systolicLowerLimit = 80; // Systolic lower limit
alert.diastolicUpperLimit = 90; // Diastolic upper limit
alert.diastolicLowerLimit = 60; // Diastolic lower limit
config.alert = alert;

[deviceInterface pushBloodPressureAutoMonitorConfig:config completion:^(NSError * _Nullable error) {
if (error) {
TSLog(@"Failed to push blood pressure config: %@", error.localizedDescription);
} else {
TSLog(@"Blood pressure monitor config pushed successfully");
}
}];

Fetch blood oxygen auto monitor configurations

Retrieves current blood oxygen (SpO2) auto monitor configurations from the device including monitoring schedule and alert thresholds.

- (void)fetchBloodOxygenAutoMonitorConfigsWithCompletion:(void (^)(TSAutoMonitorConfigs *_Nullable configs, NSError *_Nullable error))completion;

Parameters:

NameTypeDescription
completionvoid(^)(TSAutoMonitorConfigs * _Nullable, NSError * _Nullable)Completion block receiving blood oxygen monitor configs and error. configs contains current configuration on success, error contains failure information.

Code Example:

[deviceInterface fetchBloodOxygenAutoMonitorConfigsWithCompletion:^(TSAutoMonitorConfigs * _Nullable configs, NSError * _Nullable error) {
if (error) {
TSLog(@"Failed to fetch blood oxygen config: %@", error.localizedDescription);
} else if (configs) {
TSLog(@"SpO2 monitoring enabled: %@", configs.schedule.isEnabled ? @"YES" : @"NO");
TSLog(@"Alert range: %d%% - %d%%", configs.alert.lowerLimit, configs.alert.upperLimit);
}
}];

Push blood oxygen auto monitor configuration to device

Sends blood oxygen (SpO2) auto monitor configuration to the device including monitoring schedule and alert thresholds.

- (void)pushBloodOxygenAutoMonitorConfig:(TSAutoMonitorConfigs *)config
completion:(TSCompletionBlock)completion;

Parameters:

NameTypeDescription
configTSAutoMonitorConfigs *Blood oxygen auto monitor configuration to be set on device.
completionTSCompletionBlockCompletion callback indicating operation result.

Code Example:

TSAutoMonitorConfigs *config = [[TSAutoMonitorConfigs alloc] init];

// Configure schedule
TSMonitorSchedule *schedule = [[TSMonitorSchedule alloc] init];
schedule.enabled = YES;
schedule.startTime = 0; // 12:00 AM (24-hour monitoring)
schedule.endTime = 1440; // 12:00 AM next day
schedule.interval = 120; // 120 minutes
config.schedule = schedule;

// Configure blood oxygen alert thresholds
TSMonitorAlert *alert = [[TSMonitorAlert alloc] init];
alert.enabled = YES;
alert.lowerLimit = 90; // Lower limit: 90%
alert.upperLimit = 100; // Upper limit: 100%
config.alert = alert;

[deviceInterface pushBloodOxygenAutoMonitorConfig:config completion:^(NSError * _Nullable error) {
if (error) {
TSLog(@"Failed to push blood oxygen config: %@", error.localizedDescription);
} else {
TSLog(@"Blood oxygen monitor config pushed successfully");
}
}];

Fetch stress auto monitor configurations

Retrieves current stress auto monitor configurations from the device including monitoring schedule and stress level alert thresholds.

- (void)fetchStressAutoMonitorConfigsWithCompletion:(void (^)(TSAutoMonitorConfigs *_Nullable configs, NSError *_Nullable error))completion;

Parameters:

NameTypeDescription
completionvoid(^)(TSAutoMonitorConfigs * _Nullable, NSError * _Nullable)Completion block receiving stress monitor configs and error. configs contains current configuration on success, error contains failure information.

Code Example:

[deviceInterface fetchStressAutoMonitorConfigsWithCompletion:^(TSAutoMonitorConfigs * _Nullable configs, NSError * _Nullable error) {
if (error) {
TSLog(@"Failed to fetch stress config: %@", error.localizedDescription);
} else if (configs) {
TSLog(@"Stress monitoring enabled: %@", configs.schedule.isEnabled ? @"YES" : @"NO");
TSLog(@"Interval: %d minutes", configs.schedule.interval);
}
}];

Push stress auto monitor configuration to device

Sends stress auto monitor configuration to the device including monitoring schedule and stress level alert thresholds.

- (void)pushStressAutoMonitorConfig:(TSAutoMonitorConfigs *)config
completion:(TSCompletionBlock)completion;

Parameters:

NameTypeDescription
configTSAutoMonitorConfigs *Stress auto monitor configuration to be set on device.
completionTSCompletionBlockCompletion callback indicating operation result.

Code Example:

TSAutoMonitorConfigs *config = [[TSAutoMonitorConfigs alloc] init];

// Configure schedule
TSMonitorSchedule *schedule = [[TSMonitorSchedule alloc] init];
schedule.enabled = YES;
schedule.startTime = 480; // 8:00 AM
schedule.endTime = 1200; // 8:00 PM
schedule.interval = 30; // 30 minutes
config.schedule = schedule;

// Configure stress alert thresholds
TSMonitorAlert *alert = [[TSMonitorAlert alloc] init];
alert.enabled = YES;
alert.lowerLimit = 0; // Lower stress level
alert.upperLimit = 75; // High stress alert threshold
config.alert = alert;

[deviceInterface pushStressAutoMonitorConfig:config completion:^(NSError * _Nullable error) {
if (error) {
TSLog(@"Failed to push stress config: %@", error.localizedDescription);
} else {
TSLog(@"Stress monitor config pushed successfully");
}
}];

Fetch temperature auto monitor configurations

Retrieves current temperature auto monitor configurations from the device including monitoring schedule and temperature alert thresholds.

- (void)fetchTemperatureAutoMonitorConfigsWithCompletion:(void (^)(TSAutoMonitorConfigs *_Nullable configs, NSError *_Nullable error))completion;

Parameters:

NameTypeDescription
completionvoid(^)(TSAutoMonitorConfigs * _Nullable, NSError * _Nullable)Completion block receiving temperature monitor configs and error. configs contains current configuration on success, error contains failure information.

Code Example:

[deviceInterface fetchTemperatureAutoMonitorConfigsWithCompletion:^(TSAutoMonitorConfigs * _Nullable configs, NSError * _Nullable error) {
if (error) {
TSLog(@"Failed to fetch temperature config: %@", error.localizedDescription);
} else if (configs) {
TSLog(@"Temperature monitoring enabled: %@", configs.schedule.isEnabled ? @"YES" : @"NO");
TSLog(@"Alert range: %d°C - %d°C", configs.alert.lowerLimit, configs.alert.upperLimit);
}
}];

Push temperature auto monitor configuration to device

Sends temperature auto monitor configuration to the device including monitoring schedule and temperature alert thresholds.

- (void)pushTemperatureAutoMonitorConfig:(TSAutoMonitorConfigs *)config
completion:(TSCompletionBlock)completion;

Parameters:

NameTypeDescription
configTSAutoMonitorConfigs *Temperature auto monitor configuration to be set on device.
completionTSCompletionBlockCompletion callback indicating operation result.

Code Example:

TSAutoMonitorConfigs *config = [[TSAutoMonitorConfigs alloc] init];

// Configure schedule
TSMonitorSchedule *schedule = [[TSMonitorSchedule alloc] init];
schedule.enabled = YES;
schedule.startTime = 360; // 6:00 AM
schedule.endTime = 1260; // 9:00 PM
schedule.interval = 60; // 60 minutes
config.schedule = schedule;

// Configure temperature alert thresholds
TSMonitorAlert *alert = [[TSMonitorAlert alloc] init];
alert.enabled = YES;
alert.lowerLimit = 35; // Lower limit: 35°C (Celsius)
alert.upperLimit = 38; // Upper limit: 38°C (fever threshold)
config.alert = alert;

[deviceInterface pushTemperatureAutoMonitorConfig:config completion:^(NSError * _Nullable error) {
if (error) {
TSLog(@"Failed to push temperature config: %@", error.localizedDescription);
} else {
TSLog(@"Temperature monitor config pushed successfully");
}
}];

Important Notes

  1. **Single Measurement Type at a Time**: Only one measurement type can be active simultaneously. Starting a new measurement will stop any previously active measurement.

  2. **Register Before Starting**: It is recommended to register measurement data and end notification observers before starting a measurement to ensure all callbacks are properly captured.

  3. **Thread Safety**: All completion callbacks and observer blocks are called on the main thread. Long-running operations should be performed asynchronously.

  4. **Device Capability Check**: Not all measurement types are supported by all devices. Always verify device capabilities before attempting to start a specific measurement type.

  5. **Schedule Time Format**: Monitor schedule times are specified in minutes from midnight (0:00). For example, 480 represents 8:00 AM and 1200 represents 8:00 PM.

  6. **Interval Alignment**: Monitor schedule intervals must be multiples of 5 minutes (5, 10, 15, 20, 25, 30, etc.).

  7. **Alert Unit Consistency**: Unit specifications vary by measurement type - bpm for heart rate, percent (%) for blood oxygen and stress, mmHg for blood pressure, and Celsius (°C) for temperature.

  8. **Configuration Persistence**: Device auto monitor configurations are persistent. Changes pushed to the device remain effective until explicitly modified.

  9. **Heart Rate Zones**: The exerciseHRLimitMax in heart rate monitoring is used to calculate heart rate zones. Typically calculated as 220 minus the user's age for more accurate zone distribution.

  10. **Error Handling**: Always check for errors in completion callbacks. Network issues, device disconnection, or invalid parameters may result in errors that should be handled gracefully.