{IDO Data Synchronization Interface Description}

1. Overview

Provides the ability to query data synchronization status, start data synchronization, and end data synchronization.

2. Interface Capabilities

1. Query Data Synchronization Status:

1.1 Summary:

None.

1.2 API ID:

SyncStatus get syncStatus;

1.3 API Parameter Description:

@param syncStatus Data synchronization status, including

enum SyncStatus {
  init      = 0,    /// Initialization
  syncing   = 1,    /// Synchronizing
  finished  = 2,    /// Synchronization completed
  canceled  = 3,    /// Synchronization canceled
  stopped   = 4,    /// Synchronization stopped
  timeout   = 5,    /// Synchronization timed out
  error     = 6     /// Synchronization error
}

2. Start Data Synchronization:

2.1 Summary:

None.

2.2 API ID:

Stream<bool> startSync({
  required CallbackSyncProgress funcProgress,
  required CallbackSyncData funcData,
  required CallbackSyncCompleted funcCompleted
});

2.3 API Parameter Description:

2.3.1 @param funcProgress Data synchronization progress, percentage 0~100.
2.3.2 @param funcData Synchronized data content callback, including:
typedef CallbackSyncData = void Function(SyncDataType type,String jsonStr,int errorCode);

@param:type The data type of the callback, including:
enum SyncDataType {
  nullType,         // 0
  stepCount,        // 1 Step Count
  heartRate,        // 2 Heart Rate
  sleep,            // 3 Sleep
  bloodPressure,    // 4 Blood Pressure
  bloodOxygen,      // 5 Blood Oxygen
  pressure,         // 6 Pressure
  noise,            // 7 Noise
  piven,            // 8 Skin Temperature
  respirationRate,  // 9 Respiration Rate
  bodyPower,        // 10 Body Power
  HRV,              // 11 HRV
  activity,         // 12 Multiple Sports
  GPS,              // 13 GPS
  swim,             // 14 Swimming
  v2StepCount,      // 15 V2 Step Count
  v2Sleep,          // 16 V2 Sleep
  v2HeartRate,      // 17 V2 Heart Rate
  v2BloodPressure,  // 18 V2 Blood Pressure
  v2GPS,            // 19 V2 GPS
  v2Activity,       // 20 V2 Multiple Sports
  emotionType       // 21 Emotional Health
}

@param:jsonStr Synchronized data content of the callback.
@param:errorCode Error code of the callback, 0 indicates normal parsing of data.

Note: The synchronized data content corresponding to the data types can be found in => IDO Health Data Synchronization Content Description

2.3.3 @param funcCompleted Callback for completion of data synchronization with error code,

3. End Data Synchronization:

3.1 Summary:

None.

3.2 API ID:

void stopSync();

3.3 API Parameter Description:

None.

Copyright © 2023-2024 IDO. All rights reserved. all right reserved,powered by GitbookModify Date: 2025-05-30 13:20:43

results matching ""

    No results matching ""