Steps

Sets steps listener

Sets the steps change listener stepsChangeEveStm, and the result is saved in the "event" through the data stream return, which is returned as a StepsChangeBean object.

_blePlugin.stepsChangeEveStm.listen(
        (StepsChangeBean event) {
            /// Do something with new state
  });

Callback Description(event):

StepsChangeBean:

callback valuecallback value typecallback value description
stepInfoStepsChangesteps information
timeTypeintdays,from StepsTimeType

StepsChange:

callback valuecallback value typecallback value description
stepsintsteps
distanceintDistance (in meters)
caloriesintCalories (units of kilocalories)
timeintActivity duration, (the default value is 0, which means the watch does not support)

StepsTimeType:

typevalue typevalue description
todaySteps1today steps
yesterdaySteps2yesterday steps
dayBeforeYesterdaySteps3day before yesterday steps

Gets today's steps

Get today's step count data. The query result will be obtained through the stepsChangeEveStm monitoring stream, and the type is todaySteps.

_blePlugin.querySteps;

Gets historical steps

The watch can save the number of activity steps in the past three days, and can query the number of activity steps in a certain day.

Gets the activity steps data in a certain day. The query result will be obtained through the stepsChangeEveStm listening stream, and the type is yesterdaySteps or dayBeforeYesterdaySteps.

_blePlugin.queryHistorySteps(HistoryTimeType);

Parameter Description :

HistoryTimeType:

Use yesterdaySteps and dayBeforeYesterdaySteps parameters.

valuevalue typevalue description
yesterdayStepsint1
dayBeforeYesterdayStepsint2
yesterdaySleepint3
dayBeforeYesterdaySleepint4

Sets steps Detail listener

Set a step detail listener stepsDetailEveStm, and the result is saved in the "event" through the data stream return, which is returned as a StepsDetailBean object.

 _blePlugin.stepsDetailEveStm.listen(
     /// Do something with new state,for example:
        (StepsDetailBean event) {
          setState(() {
            _dateType = event.dateType!;
            _timeInterval = event.timeInterval!;
            _stepsList = event.stepsList!;
          });
        },
      ),

Callback Description(event):

StepsDetailBean:

callback valuecallback value typecallback value description
dateTypeintDate type, today or yesterday
timeIntervalinttime interval, in minutes
stepsListList< int >steps list

Gets steps Detail

Some watches support categorical statistics for the past two days.

Gets classification statistics for the past two days. The query result will be obtained through the stepsDetailEveStm listening stream and saved in "event" as the StepsDetailBean object.

_blePlugin.queryStepsDetail(StepsDetailDateType);

Parameter Description :

StepsDetailDateType:

typevaluevalue description
todayStepsCategory0today steps category
yesterdayStepsCategory2yesterday steps category
Last Updated: