Set user information
Command code
- Set user information
- IDOSetUserInfoBuletoothModel
| Parameter | Description | Remark |
|---|---|---|
| year | Year | int |
| month | Month | int |
| day | Day | int |
| height | Height | Unit: cm |
| weight | Weight | Unit: Kilogram |
| gender | Gender | 1:Male,2:Female |
Objc:
IDOSetUserInfoBuletoothModel * model = [IDOSetUserInfoBuletoothModel currentModel];
[IDOFoundationCommand setUserInfoCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetUserInfoBuletoothModel.current();
IDOFoundationCommand.setUserInfo(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};
Set v2 motion target
📢 :Execute a command every time a target type is set
IDOSetUserInfoBuletoothModel
| Parameter | Description | Remark |
|---|---|---|
| goalSleepDataHour | Target sleep (hours) | int |
| goalSleepDataMinute | Target sleep (minutes) | int |
| goalStepData | Target steps | Unit: step |
| goalCalorieData | Target Calories | Unit:Kcal |
| goalDistanceData | Target Distance | Unit:meter |
| goalWeightData | target weight | Unit:kg*100 |
| goalType | Target type | 0:Steps, 1: Calories, 2: Distance |
Objc:
IDOSetUserInfoBuletoothModel * model = [IDOSetUserInfoBuletoothModel currentModel];
[IDOFoundationCommand setTargetInfoCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Set successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetUserInfoBuletoothModel.current();
IDOFoundationCommand.setUserInfo(model) { (errorCode) in
if errorCode == 0 {
//Set successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};
Set v3 motion goals
IDOSetUserInfoBuletoothModel
Parameter Description Remark goalCalorieData Target calories Unit: Kcal goalDistanceData Target distance Unit: meter goalMidHighTimeData Medium to high duration of exercise targets Units: Second goalWalkTime Walk around the target time Unit: hour calorieMax Maximum active calories Unit: kcal calorieMin Minimum active calories Unit: kcal
Objc:
IDOSetUserInfoBuletoothModel * model = [IDOSetUserInfoBuletoothModel currentModel];
[IDOFoundationCommand setCalorieAndDistanceGoalCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//Setup successfully
}else if (errorCode == 6) {
//Device not supported
}else {
//Setup failed
}
}];
Swift:
let model = IDOSetUserInfoBuletoothModel.current();
IDOFoundationCommand.setCalorieAndDistanceGoal(model) { (errorCode) in
if errorCode == 0 {
//Setup successfully
}else if errorCode == 6{
//Device does not support this method
}else {
//Wrong setting
}
};