Monitor control commands
Monitor camera start
Objc:
[IDOFoundationCommand listenPhotoStartCommand:^(int errorCode) {
if (errorCode == 0) {
//control successfully
}else if (errorCode == 6) {
//device not supported
}else {
//Control failed
}
}];
Swift:
IDOFoundationCommand.listenPhotoStart { (errorCode) in
if errorCode == 0 {
//control successfully
}else if errorCode == 6 {
//device not supported
}else {
//Control failed.
}
};
Monitoring and taking pictures are over
Objc:
[IDOFoundationCommand listenPhotoEndCommand:^(int errorCode) {
if (errorCode == 0) {
//control successfully
}else if (errorCode == 6) {
//device not supported
}else {
//Control failed
}
}];
Swift:
IDOFoundationCommand.listenPhotoEnd { (errorCode) in
if errorCode == 0 {
//control successfully
}else if errorCode == 6 {
//device not supported
}else {
//Control failed
}
};
The monitor starts looking for the phone
Objc:
[IDOFoundationCommand listenFindPhoneStartCommand:^(int errorCode) {
if (errorCode == 0) {
//control successfully
}else if (errorCode == 6) {
//device not supported
}else {
//Control failed
}
}];
Swift:
IDOFoundationCommand.listenFindPhoneStart { (errorCode) in
if errorCode == 0 {
//control successfully
}else if errorCode == 6 {
//device not supported
}else {
//Control failed
}
};
Monitor to stop looking for phone
Objc:
[IDOFoundationCommand listenFindPhoneStopCommand:^(int errorCode) {
if (errorCode == 0) {
//control successfully
}else if (errorCode == 6) {
//device not supported
}else {
//Control failed
}
}];
Swift:
IDOFoundationCommand.listenFindPhoneStop { (errorCode) in
if errorCode == 0 {
//control successfully
}else if errorCode == 6 {
//device not supported
}else {
//Control failed.
}
};
Monitor bracelet status changes
- IDOControlDataUpdateModel
Parameters | illustrate | Remarks |
---|---|---|
unbindState | Unbound state | 0: Invalid, 1: The bracelet has been unbound |
hrModeState | Heart rate mode status | 0:Invalid, 1: Heart rate mode changed |
spo2State | blood oxygen status | 0:Invalid, 1: blood oxygen production data changed |
pressureState | state of stress | 0:Invalid, 1: Pressure produces data change |
alexaState | Alexa Identify status | 0:Invalid, 1: Exit during Alexa recognition |
resetState | Factory reset state | 0:Invalid, 1: Firmware reset to factory settings |
intoCamera | appNeed to enter the camera interface | 0:Invalid, 1: The app enters the camera |
callForHelp | sos event notification | 0:Invalid, 1: initiate a sos request |
alexaAlarmState | alexa Alarm status | 0:Invalid, 1: Alexa alarm has been modified |
alarmState | Alarm status | 0:Invalid, 1: Alarm clock modification |
overHeat | Firmware Overheating Abnormal Alarm | 0:Invalid, 1: Overheat warning |
brightScreenState | Bright screen parameters have been modified | 0:Invalid, 1: Bright screen modification |
handUpState | Wrist lift parameters have been modified | 0:Invalid, 1: Lift wrist to modify |
noDisturbState | Do Not Disturb Mode Modification | 0:Invalid, 1: Do not disturb mode modification |
volumeDownState | Phone volume down | 0:Invalid, 1: The volume of the mobile phone is lowered and modified |
errorIndex | Firmware error code returned | 01: ACC acceleration、02: PPG Heart rate 、03: TP Touch 、 04: FLASH 、05: Overheat(PPG)、06: air pressure 、 07: GPS、08: geomagnetic |
dataType | Type of data modification | 14 : The firmware requests to reset the weather, the app receives it, and sends the weather data 15: The number of firmware steps increases by 2000 steps each time, the device requests the app to synchronize data, and the app calls the synchronization interface 16: The firmware detects the end of sleep, requests the app to synchronize sleep data, and the app calls the synchronization interface to synchronize 17: Firmware three-ring data modification, notify the app to update the three-ring data 18: The firmware is fully charged and a reminder is sent. After the app receives it, the notification bar shows that the device is fully charged. 19: After exercising, manually measure heart rate, manually measure blood oxygen, and manually measure pressure, The device automatically requests synchronization, first check the link status, if it is not connected, this synchronization will not be performed, and then judge to initiate a synchronization request again after meeting the next automatic synchronization conditions 20: The firmware modifies the heart rate notification status type, the stress notification status type, the blood oxygen notification status type, the physiological cycle notification status type, Health Guidance Notification Status Type, Reminder Notification Status Type Notification App Update Heart Rate, Pressure, Blood Oxygen, Physiological Cycle, Health Guidance, Reminder Notification Status Type 21: The firmware pressure value calculation is completed, and the app is notified to obtain the pressure value 22: The firmware notifies the app that the firmware pressure calibration failed (the firmware exits the measurement interface/test failed/test timed out/not worn) 23: When the firmware generates a heart rate alert that is too high or too low, notify the app to obtain heart rate data 24: Firmware notifies app bt bluetooth is connected 25: Firmware notify app bt bluetooth disconnect 26: Firmware bluetooth call starts 27: Firmware bluetooth call ended 28: The new version firmware sends a notification command every 4 minutes and 30 seconds to fix the offline problem 29: Notify the app of the start of movement (same as 26 for intercepting dial transmission) 30: Notify the app of the end of the movement (the same as 27 for intercepting the dial transmission) |
notifyType | Notification type | 1 Alarm has been modified 2 Firmware Overheating Abnormal Alarm 4 Bright screen parameters have been modified(02 b0) 8 Wrist lift parameters have been modified(02 b1) 16 Get Do Not Disturb Mode(02 30) 32 Delivery of mobile phone volume(03 0xE3)(Delete),App volume modification, direct delivery |
Objc:
[IDOFoundationCommand listenStateChangeCommand:^(int errorCode,IDOControlDataUpdateModel *_Nullable model) {
if (errorCode == 0) {
//control successfully
}else if (errorCode == 6) {
//device not supported
}else {
//Control failed
}
}];
Swift:
IDOFoundationCommand.listenStateChange { (errorCode,model) in
if errorCode == 0 {
//control successfully
}else if errorCode == 6 {
//device not supported
}else {
//Control failed.
}
};