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
setSpo2Switch
Body energy switch
setBodyPowerTurn
Initialize body temperature switch
setTemperatureSwitch
Breathing switch
setRRespiRateTurn
Drinking water reminder
setDrinkWaterRemind
Set fitness guidance switch
setFitnessGuidance
3 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
setHeartRateInterval
Set 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
setV3Noise
Set stress switch
setStressSwitch
Set scientific sleep switch
setScientificSleepSwitch
Set voice assistant switch
setVoiceAssistantOnOff
Set walking reminder
setWalkRemind
Set hand washing reminder
setHandWashingReminder
Set music switch
setMusicOnOff
Set do not disturb mode
setNotDisturb
Set to find phone
setFindPhone
Set the sports mode recognition switch
setActivitySwitch
Set the menu list
setMenuList
Set the firmware call quick reply switch
setCallQuickReplyOnOff
Set the screen brightness
setScreenBrightness
Set the screen to light up when you raise your wrist
setUpHandGesture
Set the weather switch
setWeatherSwitch
2. Not according to the function table
Set default unit
setUnit
Set 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
}
})