Set Calorie and Distance Goal (Set Daily Three Rings)
Function: setCalorieGoal, exMain3DistanceGoal (to be supplemented in SDK), set_mid_high_time_goal_03_43 (to be supplemented in C library JSON ID), getSupportGetMainSportGoalV3, getSupportSetGetTimeGoalTypeV2
Flutter Example:
/// Set daily three rings goal event number
setCalorieDistanceGoal(
evtBase: _VBusEvtBase.base_app_set,
evtType: _VBusEvtType.app_set_calorie_distance_goal),
/// Set daily three rings goal
libManager.send(evt: CmdEvtType.setCalorieDistanceGoal, json: jsonEncode(json));
JSON fields sent by the App:
Field Name | Field Type | Field Description |
---|---|---|
calorie | int | Activity calorie goal Unit: calories |
distance | int | Distance Unit: meters |
calorie_min | int | Minimum activity calorie value Unit: calories |
calorie_max | int | Maximum activity calorie value Unit: calories |
mid_high_time_goal | int | Mid to high-intensity exercise duration goal Unit: seconds |
walk_goal_time | int | Goal time Unit: seconds |
time_goal_type | int | Goal type 0: Invalid 1: Daily goal 2: Weekly goal |
Example:
{
"calorie": 500,
"distance": 200,
"calorie_min": 100,
"calorie_max": 666,
"mid_high_time_goal": 600,
"walk_goal_time": 600,
"time_goal_type": 0
}