Blood Oxygen

Sets blood oxygen listener

_blePlugin.bloodOxygenEveStm.listen(
   (BloodOxygenBean event) {
      /// Do something with new state,for example:
     switch (type) {
              case BloodOxygenType.continueState:
                _continueState = event.continueState!;
                break;
              case BloodOxygenType.timingMeasure:
                _timingMeasure = event.timingMeasure!;
                break;
              case BloodOxygenType.bloodOxygen:
                _bloodOxygen = event.bloodOxygen!;
                break;
              case BloodOxygenType.historyList:
                _historyList = event.historyList!;
                break;
              case BloodOxygenType.continueBO:
                _continueBo = event.continueBo!;
                startTime = _continueBo!.startTime!;
                timeInterval = _continueBo!.timeInterval!;
                break;
              default:
                break;
            }
  });

Callback Description:

BloodOxygenBean:

callback valuecallback value typecallback value description
typeintGet the corresponding return value according to type, where type is the value corresponding to BloodOxygenType
continueStateboolTimed blood oxygen status
timingMeasureintTimed oximetry status
bloodOxygenintMeasure blood oxygen results
historyListList< HistoryBloodOxygenBean >Historical SpO2 information
continueBOBloodOxygenInfoTimed blood oxygen information

BloodOxygenType:

typevaluevalue description
continueState1Gets continue blood oxygen state
timingMeasure2Gets timing measurement of blood oxygen status
bloodOxygen3Gets blood oxygen measurement results
historyList4Gets history once blood oxygen
continueBO5Gets timing blood oxygen

HistoryBloodOxygenBean:

callback valuecallback value typecallback value description
dateStringdate
bointblood oxygen

BloodOxygenInfo:

callback valuecallback value typecallback value description
startTimeintStart measuring time
timeIntervalinttime interval

Measuring blood oxygen

_blePlugin.startMeasureBloodOxygen;

Stop measuring blood oxygen

When the blood oxygen measurement is stopped, if the measurement time is too short, there will be no measurement results.

The measurement results are monitored through the bloodOxygenEveStm data stream, and the value is stored in BloodOxygenBean.bloodOxygen,type is bloodOxygen.

_blePlugin.stopMeasureBloodOxygen;

Enable timing measure blood oxygen

measure period = interval * 5 (mins)

_blePlugin.enableTimingMeasureBloodOxygen(int interval);

Disable timing measure blood oxygen

_blePlugin.disableTimingMeasureBloodOxygen;

Gets timing measure blood oxygen state

The measurement results are monitored through the bloodOxygenEveStm data stream, and the value is stored in BloodOxygenBean.timingMeasure,type is timingMeasure.

_blePlugin.queryTimingBloodOxygenMeasureState;

Gets timing blood oxygen

The measurement results are monitored through the bloodOxygenEveStm data stream, and the value is stored in BloodOxygenBean.continueBO,type is continueBO.

_blePlugin.queryTimingBloodOxygen(BloodOxygenTimeType);

Parameter Description :

BloodOxygenTimeType:

valuevalue typevalue description
todayStringtoday
yesterdayStringyesterday

Enable continue blood oxygen

_blePlugin.enableContinueBloodOxygen;

Disable continue blood oxygen

_blePlugin.disableContinueBloodOxygen;

Gets continue blood oxygen state

The measurement results are monitored through the bloodOxygenEveStm data stream, and the value is stored in BloodOxygenBean.continueState,type is continueState.

_blePlugin.queryContinueBloodOxygenState;

Gets last 24 hour blood oxygen

The measurement results are monitored through the bloodOxygenEveStm data stream, and the value is stored in BloodOxygenBean.continueBO,type is continueBO.

_blePlugin.queryLast24HourBloodOxygen;

Gets history once blood oxygen

The measurement results are monitored through the bloodOxygenEveStm data stream, and the value is stored in BloodOxygenBean.historyList,type is historyList.

_blePlugin.queryHistoryBloodOxygen;
Last Updated: