Question about Bangle.getStepCount()

Posted on
  • Hello,

    The doc of Bangle.getStepCount() says

    Returns The number of steps recorded by the step counter

    but I noticed that all the apps get the step count using Bangle.getHealthStatus("day").steps.

    I just send this code to my Bangle2 as a test:

    Bangle.on('step', function(up) {
      console.log("getStepCount: " + Bangle.getStepCount());
      console.log("getHealthStatus.steps: "+ Bangle.getHealthStatus("day").steps);
    });
    

    The output is not what I expected:

    getStepCount: 6442
    getHealthStatus.steps: 3494
    getStepCount: 6443
    getHealthStatus.steps: 3495
    getStepCount: 6444
    getHealthStatus.steps: 3496
    getStepCount: 6445
    getHealthStatus.steps: 3497
    getStepCount: 6446
    getHealthStatus.steps: 3498
    getStepCount: 6447
    getHealthStatus.steps: 3499
    getStepCount: 6448
    getHealthStatus.steps: 3500
    getStepCount: 6449
    getHealthStatus.steps: 3501
    

    Why is there this difference?

    Thank you :-)

  • Bangle.getStepCount() returns the step count since the last reboot of the watch.
    Bangle.getHealthStatus("day").steps is reset at midnight each day. This is the more useful measure in my opinion.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Question about Bangle.getStepCount()

Posted by Avatar for Alessandro @Alessandro

Actions