{IDO Data Exchange Interface Specification}
1. Functional Overview
Provides the ability to initiate data exchanges, listen for BLE device replies, and BLE device initiated data exchanges.
2. Interface Capabilities
1. Query Support for V3 Activity Data Exchange:
1.1 Function Overview:
None.
1.2 API ID:
bool get supportV3ActivityExchange;
1.3 API Parameter Explanation:
@return: bool Supported function list, false: not supported, true: supported.
2. Query Data Exchange Status:
2.1 Function Overview:
None.
2.2 API ID:
ExchangeStatus? get status;
2.3 API Parameter Explanation:
@param: ExchangeStatus Data exchange status, including:
enum ExchangeStatus {
init = 0, /// Initialization
appStart = 1, /// App initiates start
appStartReply = 2, /// App initiates start BLE reply
appEnd = 3, /// App initiates end
appEndReply = 4, /// App initiates end BLE reply
appPause = 5, /// App initiates pause
appPauseReply = 6, /// App initiates pause BLE reply
appRestore = 7, /// App initiates restore
appRestoreReply = 8, /// App initiates restore BLE reply
appIng = 9, /// App initiates exchange
appIngReply = 10, /// App initiates exchange BLE reply
getActivity = 11, /// Get last activity data
getActivityReply = 12, /// Get last activity data BLE reply
getHr = 13, /// Get one-minute heart rate
getHrReply = 14, /// Get one-minute heart rate BLE reply
getActivityGps = 15, /// Get activity GPS
getActivityGpsReply = 16, /// Get activity GPS BLE reply
appStartPlan = 17, /// App starts exercise plan
appStartPlanReply = 18, /// App starts exercise plan BLE reply
appPausePlan = 19, /// App pauses exercise plan
appPausePlanReply = 20, /// App pauses exercise plan BLE reply
appRestorePlan = 21, /// App restores exercise plan
appRestorePlanReply = 22, /// App restores exercise plan BLE reply
appEndPlan = 23, /// App ends exercise plan
appEndPlanReply = 24, /// App ends exercise plan BLE reply
appSwitchAction = 25, /// App switches action
appSwitchActionReply= 26, /// App ends exercise plan BLE reply
appBlePause = 27, /// App-initiated exercise BLE pause
appBlePauseReply = 28, /// App-initiated exercise BLE pause app reply
appBleRestore = 29, /// App-initiated exercise BLE restore
appBleRestoreReply = 30, /// App-initiated exercise BLE restore app reply
appBleEnd = 31, /// App-initiated exercise BLE end
appBleEndReply = 32, /// App-initiated exercise BLE end app reply
bleStart = 33, /// BLE-initiated exercise BLE start
bleStartReply = 34, /// BLE-initiated exercise BLE start app reply
bleEnd = 35, /// BLE-initiated exercise BLE end
bleEndReply = 36, /// BLE-initiated exercise BLE end app reply
blePause = 37, /// BLE-initiated exercise BLE pause
blePauseReply = 38, /// BLE-initiated exercise BLE pause app reply
bleRestore = 39, /// BLE-initiated exercise BLE restore
bleRestoreReply = 40, /// BLE-initiated exercise BLE restore app reply
bleIng = 41, /// BLE-initiated exercise BLE exchange
bleIngReply = 42, /// BLE-initiated exercise BLE exchange app reply
bleStartPlan = 43, /// BLE starts exercise plan
blePausePlan = 44, /// BLE pauses exercise plan
bleRestorePlan = 45, /// BLE restores exercise plan
bleEndPlan = 46, /// BLE ends exercise plan
bleSwitchAction = 47, /// BLE switches action
bleOperatePlanReply = 48, /// BLE operates exercise plan app reply
}
3. APP Executes Data Exchange:
3.1 Function Overview:
Provides the ability to initiate exercise start, end, pause, resume, exchange exercise data during exercise, and execute exercise plans.
3.2 API ID:
void appExec({required IDOBaseExchangeModel model});
3.3 API Parameter Explanation:
@param: Execution type, including:
IDOAppStartExchangeModel // Execute initiate exercise start
IDOAppEndExchangeModel // Execute initiate exercise end
IDOAppIngExchangeModel // Execute exchange exercise data
IDOAppPauseExchangeModel // Execute exchange exercise data pause
IDOAppRestoreExchangeModel // Execute exchange exercise data resume
IDOAppIngV3ExchangeModel // Execute V3 exchange exercise data
IDOAppOperatePlanExchangeModel // Execute operate exercise plan
=> Go to APP Initiated Data Exchange Model Explanation
4. APP Executes Data Exchange Reply:
4.1 Function Overview:
Provides the ability for the app to reply to device requests when the device initiates exercise/exercise data exchange.
4.2 API ID:
void appReplyExec({required IDOBaseExchangeModel model});
4.3 API Parameter Explanation:
@param: Execution type, including:
IDOBleStartReplyExchangeModel // App replies to BLE device's request to start exercise data exchange
IDOBleIngReplyExchangeModel // App replies to BLE device during exercise data exchange
IDOBleEndReplyExchangeModel // App replies to BLE device's request to end exercise data exchange
IDOBlePauseReplyExchangeModel // App replies to BLE device's request to pause exercise data exchange
IDOBleRestoreReplyExchangeModel // App replies to BLE device's request to resume exercise data exchange
IDOBleOperatePlanReplyExchangeModel // App replies to BLE device's request to operate exercise plan
IDOAppBlePauseReplyExchangeModel // App replies to BLE device's request to pause exercise data exchange
IDOAppBleRestoreReplyExchangeModel // App replies to BLE device's request to resume exercise data exchange
IDOAppBleEndReplyExchangeModel // App replies to BLE device's request to end exercise data exchange
=> App Reply Model for BLE Device Initiated Exercise Exchange
5. Get multiple sports data after multiple sports interaction:
5.1 Function Summary:
None.
5.2 API ID:
Stream<ExchangeResponse> getLastActivityData();
5.3 API Parameters:
@return: IDOAppActivityDataV3ExchangeModel, which includes the following members:
int? day; /// Date
int? hour; /// Hour
int? minute; /// Minute
int? second; /// Second
int? sportType; /// Sport type
int? year; /// Year
int? month; /// Month
int? version; /// Protocol library version
int? hrInterval; /// Heart rate interval in minutes
int? step; /// Steps
int? durations; /// Duration
int? calories; /// Calories
int? distance; /// Distance
int? burnFatMins; /// Duration of fat burning heart rate in minutes
int? aerobicMins; /// Duration of aerobic exercise in minutes
int? limitMins; /// Duration of extreme exercise in minutes
int? warmUp; /// Warm-up exercise
int? fatBurning; /// Fat burning
int? aerobicExercise; /// Aerobic exercise
int? anaerobicExercise; /// Anaerobic exercise
int? extremeExercise; /// Extreme exercise
int? warmUpTime; /// Accumulated time for warm-up exercise in seconds
int? fatBurningTime; /// Accumulated time for fat burning in seconds
int? aerobicExerciseTime; /// Accumulated time for aerobic exercise in seconds
int? anaerobicExerciseTime;/// Accumulated time for anaerobic exercise in seconds
int? extremeExerciseTime; /// Accumulated time for extreme exercise in seconds
int? avgSpeed; /// Average speed in km/h
int? maxSpeed; /// Maximum speed in km/h
int? avgStepStride; /// Average step stride
int? maxStepStride; /// Maximum step stride
int? kmSpeed; /// Average km pace
int? fastKmSpeed; /// Fastest km pace
int? avgStepFrequency; /// Average step frequency
int? maxStepFrequency; /// Maximum step frequency
int? avgHrValue; /// Average heart rate
int? maxHrValue; /// Maximum heart rate
int? recoverTime; /// Recovery time in hours. After receiving this data, subtract 1 every hour.
int? vo2max; /// Maximum oxygen uptake in ml/kg/min
int? trainingEffect; /// Training effect. Range: 1.0 - 5.0 (multiply by 10 for transmission)
int? grade; /// Oxygen uptake level: 1: Low, 2: Amateur, 3: General, 4: Average, 5: Good, 6: Excellent, 7: Professional
int? stepsFrequencyCount; /// Number of step frequency details
int? miSpeedCount; /// Number of mile paces (maximum 100)
int? realSpeedCount; /// Number of real-time speeds
int? paceSpeedCount; /// Number of real-time paces
int? kmSpeedCount; /// Number of km paces details (maximum 100)
int? actionDataCount; /// Number of action training
List<int>? kmSpeeds; /// Time spent per km in seconds, pace collection
List<int>? stepsFrequency; /// Step frequency collection (steps per minute)
List<int>? itemsMiSpeed; /// Mile pace array
List<int>? itemRealSpeed; /// Real-time speed array in km/h
List<int>? paceSpeedItems; /// Real-time pace array
/// Action completion content
/// type: Action type, 1: Fast walking, 2: Jogging, 3: Medium-speed running, 4: Fast running
/// heart_con_value: Heart rate control for each action
/// time: Completion time of the action in seconds
/// goal_time: Goal time for the action
List<Map<String, dynamic>>? actionData;
6. Get heart rate data after multiple sports interaction:
6.1 Function Summary:
None.
6.2 API ID:
Stream<ExchangeResponse> getActivityHrData();
6.3 API Parameters:
@return: IDOAppHrDataExchangeModel for one-minute heart rate data, which includes the following members:
int? day; /// Date
int? hour; /// Hour
int? minute; /// Minute
int? second; /// Second
int? sportType; /// Sport type
int? version; /// Protocol version
int? heartRateHistoryLen;/// Length of heart rate data array (maximum 60)
int? interval; /// Heart rate interval in seconds
List<int>? heartRates; /// Heart rate data array, storing one minute of heart rate data with one entry per second
7. Listen to device-initiated data exchange:
7.1 Function Summary:
Allows listening to the device-initiated data exchange and the app will execute the data exchange response.
7.2 API ID:
Stream<ExchangeResponse> appListenBleExec();
7.3 API Parameters:
@return: BleNoticeModel types, including:
IDOBleStartExchangeModel // BLE device initiates sports data exchange start
IDOBleIngExchangeModel // BLE device is in the process of sports data exchange
IDOBleEndExchangeModel // BLE device initiates sports data exchange end
IDOBlePauseExchangeModel // BLE device pauses sports data exchange
IDOBleRestoreExchangeModel // BLE device resumes sports data exchange
IDOBleOperatePlanExchangeModel // BLE device operates sports plan
IDOAppBlePauseExchangeModel // BLE device notifies pause of sports data exchange
IDOAppBleRestoreExchangeModel // BLE device notifies resume of sports data exchange
IDOAppBleEndExchangeModel // BLE device notifies end of sports data exchange
=> Go to BLE Data Exchange Model Documentation
8. APP listens to the device's response after the app initiates data exchange:
8.1 Function Overview:
Provides the ability to listen to the device's response after the app initiates data exchange.
8.2 API ID:
Stream<ExchangeResponse> appListenAppExec();
8.3 API Parameter Description:
@return: The type of response to listen for, including:
IDOAppStartReplyExchangeModel // Reply from the BLE device when the app initiates a workout
IDOAppEndReplyExchangeModel // Reply from the BLE device when the app ends a workout
IDOAppIngReplyExchangeModel // Reply from the BLE device during ongoing data exchange with the app
IDOAppPauseReplyExchangeModel // Reply from the BLE device when the app pauses data exchange during a workout
IDOAppRestoreReplyExchangeModel // Reply from the BLE device when the app resumes data exchange during a workout
IDOAppIngV3ReplyExchangeModel // Reply from the BLE device during ongoing V3 data exchange with the app
IDOAppOperatePlanReplyExchangeModel // Reply from the BLE device when the app operates a workout plan
=> Go to the model description for BLE response to app-initiated data exchange
9. APP listens to the response of V2 data exchange:
9.1 Function Overview:
Provides the ability to listen to the device's response after the app initiates V2 data exchange.
9.2 API ID:
Stream<IDOV2ExchangeModel> v2_exchangeData();
9.3 API Parameter Description:
@return: The returned model IDOV2ExchangeModel contains the following members:
int? day; /// Date
int? hour; /// Hour
int? minute; /// Minute
int? second; /// Second
int? sportType; /// Type of sport
int? operate; /// 1: Request app to enable GPS, 2: Initiate workout request
int? targetValue; /// 0: No target, 1: Repetition count (unit: times), 2: Distance (unit: meters), 3: Calories (unit: kcal), 4: Duration (unit: minutes), 5: Step count (unit: steps)
int? targetType; /// Target value
int? forceStart; /// Whether to force start: 0 - No, 1 - Yes
int? retCode; /// 0: Success; 1: Failed to enter workout mode due to device; 2: Low battery; 3: Band is charging; 4: Using Alexa; 5: On a call
int? calories; /// Calories burned (unit: kcal)
int? distance; /// Distance covered (unit: meters)
int? durations; /// Workout duration (unit: seconds)
int? step; /// Step count (unit: steps)
int? avgHr; /// Average heart rate
int? maxHr; /// Maximum heart rate
int? curHr; /// Current heart rate
int? hrSerial; /// Heart rate serial number
int? burnFatMins; /// Duration of fat burning (unit: minutes)
int? aerobicMins; /// Duration of aerobic activity (unit: minutes)
int? limitMins; /// Duration of limit activity (unit: minutes)
bool? isSave; /// Whether to save the data
int? status; /// 0: All data is valid, 1: Invalid distance, 2: Weak GPS signal
int? interval; /// Heart rate interval
List<int>? hrValues = [];/// Heart rate data collection
10. APP Listening for V3 Motion Data Exchange Response
10.1 Summary of Functionality:
Provides the ability to listen for the response from BLE devices after the app performs V3 motion data exchange.
10.2 API ID:
Stream<IDOV3ExchangeModel> v3_exchangeData();
10.3 API Parameter Description:
@return: Returns the model IDOV3ExchangeModel for listening, which includes the following members:
int? year; /// Training course year
int? month; /// Training course month
int? day; /// Date
int? hour; /// Hour
int? minute; /// Minute
int? second; /// Second
int? sportType; /// Sport type
int? planType; /// Plan type 1: 3km running plan, 2: 5km running plan, 3: 10km running plan, 4: Half Marathon Training (Phase 2), 5: Marathon Training (Phase 2)
int? actionType; /// Action type 1: brisk walking, 2: jogging, 3: medium paced running, 4: fast running, 5: end course exercise (waiting for user's free exercise) 6: free exercise after course (this field is effective when operate is 5)
int? version; /// Data version
int? operate; /// 1: request app to turn on GPS, 2: initiate exercise request
int? targetValue; /// 0: no target, 1: repetition count (unit: times), 2: distance (unit: meters), 3: calories (unit: kcal), 4: duration (unit: minutes), 5: step count (unit: steps)
int? targetType; /// Target value
int? forceStart; /// Whether to forcefully start 0: not forceful, 1: forceful
int? retCode; /// 0: success; 1: failed to put the device in exercise mode; 2: low device battery; 3: bracelet is charging; 4: using Alexa; 5: in a call
int? calories; /// Calories (unit: kcal)
int? distance; /// Distance (unit: meters)
int? durations; /// Duration (unit: seconds)
int? step; /// Step count (unit: steps)
int? swimPosture; /// 0: mixed style; 1: freestyle; 2: breaststroke; 3: backstroke; 4: butterfly;
int? status; /// Status returned by the bracelet: Start: 1, Pause: 2, End: 3, 0: invalid status
int? signalFlag; /// Signal strength: 0: weak signal, 1: strong signal
bool? isSave; /// Whether to save the data
int? realTimeSpeed; /// Real-time speed calculated and displayed by the app (unit: km/h, 100 times, with a record every 15 seconds)
int? realTimePace; /// Real-time pace calculated and displayed by the app (unit: seconds)
int? interval; /// Heart rate interval
int? hrCount; /// Number of heart rate data
int? burnFatMins; /// Duration of fat burning exercise (unit: minutes)
int? aerobicMins; /// Duration of aerobic exercise (unit: minutes)
int? limitMins; /// Duration of limit exercise (unit: minutes)
List<int>? hrValues = []; /// Heart rate data collection
int? warmUpSecond; /// Warm-up exercise duration (in seconds)
int? anaeroicSecond; /// Anaerobic exercise duration (in seconds)
int? fatBurnSecond; /// Fat burning exercise duration (in seconds)
int? aerobicSecond; /// Aerobic exercise duration (in seconds)
int? limitSecond; /// Limit exercise duration (in seconds)
int? avgHr; /// Average heart rate
int? maxHr; /// Maximum heart rate
int? curHr; /// Current heart rate
int? warmUpValue; /// Warm-up exercise value
int? fatBurnValue; /// Fat burning exercise value
int? aerobicValue; /// Aerobic exercise value
int? limitValue; /// Limit exercise value
int? anaerobicValue; /// Anaerobic exercise value
int? avgSpeed; /// Average speed (km/h)
int? maxSpeed; /// Maximum speed (km/h)
int? avgStepFrequency; /// Average step frequency
int? maxStepFrequency; /// Maximum step frequency
int? avgStepStride; /// Average step stride
int? maxStepStride; /// Maximum step stride
int? kmSpeed; /// Average kilometer pace
int? fastKmSpeed; /// Fastest kilometer pace
int? kmSpeedCount; /// Number of kilometer paces
List<int>? kmSpeeds = []; /// Kilometer pace collection
int? mileCount; /// Number of mile paces
List<int>? mileSpeeds = []; /// Mile pace collection
int? stepsFrequencyCount; /// Number of step frequencies
List<int>? stepsFrequencys = [];/// Step frequency collection
int? trainingEffect; /// Training effect; Unit: None; Range: 1.0 ~ 5.0 (*10 times)
int? anaerobicTrainingEffect; /// Anaerobic training effect; Unit: None; Range: 1.0 ~ 5.0 (*10 times)
int? vo2Max; /// Maximum oxygen uptake; Unit: milliliters/kilogram/minute; Range: 0-80
int? actionDataCount; /// Number of action training
int? inClassCalories; /// Calories burned during class; Unit: kcal
int? completionRate; /// Action completion rate 0-100
int? hrCompletionRate; /// Heart rate control rate 0-100
int? recoverTime; /// Recovery time: Unit: hours (decrease by one hour after the app receives this data)
int? avgWeekActivityTime; /// Average weekly exercise time last month; Unit: minutes
int? grade; /// VO2 level 1: Low level 2: Amateur level 3: Average level 4: Medium level 5: Good level 6: Excellent level 7: Professional level
/// Action completion details
/// type: Action type 1 brisk walking; 2 jogging; 3 medium paced running; 4 fast running
/// heart_con_value: Heart rate control for each action
/// time: Action completion time (unit: seconds)
/// goal_time: Goal time for the action
List<Map<String, dynamic>>? actionData = [];
int? trainingOffset; /// Course training date offset starting from 0
int? countHour; /// Exercise countdown hours
int? countMinute; /// Exercise countdown minutes
int? countSecond; /// Exercise countdown seconds
int? time; /// Action goal time (unit: seconds)
int? lowHeart; /// Low heart rate range
int? heightHeart; /// High heart rate range
int? paceSpeedCount; /// Real-time pace count
List<int>? paceSpeeds = [];/// Real-time pace array (recorded every 5 seconds)
int? realSpeedCount; /// Real-time speed count
List<int>? realSpeeds = [];/// Real-time speed array (recorded every 5 seconds)
int? intervalSecond; /// GPS coordinate point time interval
int? gpsCount; /// Number of GPS coordinates
/// GPS data details [{'latitude':0,'longitude':0}]
List<Map<String, dynamic>>? gpsData = [];
11. APP Getting GPS Data for Multiple Exercise Interactions:
11.1 Summary of Functionality:
None.
11.2 API ID:
Stream<ExchangeResponse> getActivityGpsData();
11.3 API Parameter Description:
@return: GPS data model, which includes the following members:
int? day; /// Date
int? hour; /// Hour
int? minute; /// Minute
int? second; /// Second
int? sportType; /// Sport type
int? version; /// Protocol version number
int? intervalSecond; /// Coordinate point time interval in seconds
int? gpsCount; /// Number of coordinate points
/// GPS data details [{'latitude':0,'longitude':0}]
List<Map<String, dynamic>>? gpsData;