iDO device synchronization configuration instructions after binding
Choose according to your own product needs (Optional/Multiple Choice)
1. Required function table judgment:
Automatic blood oxygen detection
setSpo2SwitchBody energy switch
setBodyPowerTurnInitialize body temperature switch
setTemperatureSwitchBreathing switch
setRRespiRateTurnDrinking water reminder
setDrinkWaterRemindSet fitness guidance switch
setFitnessGuidance3 types of heart rate, determine which one to send according to the function table (select one according to the function table) setHeartRateModeSmart, setHeartMode (old), setHeartRateMode (old)
Set the default value of the heart rate interval
setHeartRateIntervalSet the sorting of exercise types (more first, according to the function table) setSportSortV3, setSportModeSort (old)
Set physiological cycle setMenstruation
Set physiological cycle reminder setMenstruationRemind
Set the switch and threshold of ambient volume
setV3NoiseSet stress switch
setStressSwitchSet scientific sleep switch
setScientificSleepSwitchSet voice assistant switch
setVoiceAssistantOnOffSet walking reminder
setWalkRemindSet hand washing reminder
setHandWashingReminderSet music switch
setMusicOnOffSet do not disturb mode
setNotDisturbSet to find phone
setFindPhoneSet the sports mode recognition switch
setActivitySwitchSet the menu list
setMenuListSet the firmware call quick reply switch
setCallQuickReplyOnOffSet the screen brightness
setScreenBrightnessSet the screen to light up when you raise your wrist
setUpHandGestureSet the weather switch
setWeatherSwitch2. Not according to the function table
Set default unit
setUnitSet user information
setUserInfo
Bind & Unbind
Example
Swift:
// Binding
sdk.cmd.bind(osVersion: 15) { devInfo in
print("1 Obtained device information - battLevel: \(devInfo.battLevel)")
} onFuncTable: { ft in
print("1Get the menu - alexaSetEasyOperateV3: \(ft.alexaSetEasyOperateV3)")
} completion: { status in
switch status {
case .failed:
print("\(status)")
// Binding failed
case .successful:
// Binding successful
print("\(status)")
print("2 Obtained device information - battLevel: \(sdk.device.battLevel)")
print("2 Get the function table - alexaSetEasyOperateV3: \(sdk.funcTable.alexaSetEasyOperateV3)")
case .binded:
print("\(status)")
case .needAuth:
print("\(status)")
case .refusedBind:
print("\(status)")
case .wrongDevice:
print("\(status)")
case .authCodeCheckFailed:
print("\(status)")
case .canceled:
print("\(status)")
case .failedOnGetFunctionTable:
print("\(status)")
case .failedOnGetDeviceInfo:
print("\(status)")
}
}
// Unbind
sdk.cmd.unbind(macAddress: macAddress, isForceRemove: true, completion: { rs in
ifrs{
// Unbinding successful
} else {
// Unbinding failed
}
})
Kotlin:
//Bind
sdk.cmd.bind(15, {
println("Get device information state$it");
}, {
println("Get the function table functableinterface state$it");
}, {
closeProgressDialog()
when (it) {
IDOBindStatus.SUCCESSFUL -> {
toast("bind ok")
//save bind info
SPUtil.putAValue(bind_key + device?.macAddress, true)
}
IDOBindStatus.FAILED,
IDOBindStatus.BINDED,
IDOBindStatus.NEEDAUTH,
IDOBindStatus.REFUSEDBIND -> {
println("bind failed: ${it.name}")
toast("bind failed: ${it.name}")
}
else -> {
}
}
})
// Unbind
sdk.cmd.unbind(macAddress = macAddress, isForceRemove = true, completion = { rs ->
if (rs) {
// Unbinding successful
} else {
// Unbinding failed
}
})