Body Temperature

Sets listener of temperature measurement results

Sets the monitoring of body temperature measurement results to return the corresponding data of body temperature.

_blePlugin.tempChangeEveStm.listen(
        (TempChangeBean event) {
          setState(() {
            /// Do something with new state,for example:
            switch (event.type) {
              case TempChangeType.continueState:
                _enable = event.enable!;
                break;
              case TempChangeType.measureTemp:
                _temp = event.temp!;
                break;
              case TempChangeType.measureState:
                _state = event.state!;
                break;
              case TempChangeType.continueTemp:
                _tempInfo = event.tempInfo;
                _tempTimeType = _tempInfo!.tempTimeType!;
                _startTime = _tempInfo!.startTime!;
                _tempList = _tempInfo!.tempList!;
                break;
              default:
                break;
            }
          });
        });

Callback Description(event):

TempChangeBean´╝Ü

callback valuecallback value typecallback value description
typeintGet the corresponding return value according to type, where type is the value corresponding to TempChangeType
enableboolwhether to continue measuring true:enable false:disable
tempdoublereal-time body temperature
statebooltemperature measurement status true:measuring false:end of measurement
tempInfoTempInfoBody temperature information

TempChangeType´╝Ü

typevaluevalue description
continueState1Continue to measure body temperature
measureTemp2Start measuring the temperature obtained by taking the temperature
measureState3measure body temperature
continueTemp4The temperature value obtained by continuing to measure the body temperature

TempInfo

callback valuecallback value typecallback value description
typeTempTimeTypeBody temperature timing measurement status.
startTimelongTemperature measurement start time
tempListList< Float >Temperature record sheet
measureIntervalintMeasurement interval (unit: minute, default 30 minutes)

TempTimeType:

typevalue typevalue
todayString"TODAY"
yesterdayString"YESTERDAY"

Start measuring once temperature

Start taking temperature.

When starting a temperature measurement. The query result will be obtained through the tempChangeEveStm monitoring stream, the return type is TempChangeBean, and the real-time body temperature and measurement status are TempChangeBean.temp and TempChangeBean.state,type ismeasureTemp and type is measureState Respectively.

_blePlugin.startMeasureTemp;

Stop measuring once temperature

_blePlugin.stopMeasureTemp;

Enable timing temperature measurement

When the chronograph measurement is turned on, the watch automatically measures the temperature every half an hour.

_blePlugin.enableTimingMeasureTemp;

Disable timing temperature measurement

_blePlugin.disableTimingMeasureTemp;

Gets the timing of temperature measurement status

Get the temperature measurement status. The query result will be obtained through the tempChangeEveStm monitoring stream, the type is measureState, and the measurement state is TempChangeBean.state.

String timingTempState = await _blePlugin.queryTimingMeasureTempState;

Gets the result of timing temperature measurement

The measurement state is obtained through tempChangeEveStm, and the result is stored in TempChangeBean.continueTemp.

_blePlugin.queryTimingMeasureTemp(TempTimeType);
Last Updated: