rn-apple-healthkit icon indicating copy to clipboard operation
rn-apple-healthkit copied to clipboard

add ability to skip manual steps, distance and climbed activity

Open thegamenicorus opened this issue 6 years ago • 5 comments

just add 'skipManual' params in options object.

const options = {
    date: new Date().toISOString(),
    skipManual: true
  };
  AppleHealthKit.getStepCount(options, (err, results) => {
    if (err) {
      return 0;
    }
    ...other actions
  });

thegamenicorus avatar Jan 23 '19 18:01 thegamenicorus

Are you able to provide a means of telling which device the steps come from?

For example I currently get this from the get hourly method.

`0: {value: 361, startDate: "2019-02-21T14:30:04.184-0400", endDate: "2019-02-21T14:34:55.914-0400"}

1: {value: 127, startDate: "2019-02-21T14:33:24.543-0400", endDate: "2019-02-21T14:34:29.612-0400"}

2: {value: 63, startDate: "2019-02-21T14:32:10.966-0400", endDate: "2019-02-21T14:33:24.543-0400"}

3: {value: 36, startDate: "2019-02-21T14:31:04.984-0400", endDate: "2019-02-21T14:32:10.966-0400"}

4: {value: 118, startDate: "2019-02-21T14:30:02.587-0400", endDate: "2019-02-21T14:31:04.984-0400"}`

But i would like something like this

`0: {value: 361, startDate: "2019-02-21T14:30:04.184-0400", endDate: "2019-02-21T14:34:55.914-0400", device: "phone"}

1: {value: 127, startDate: "2019-02-21T14:33:24.543-0400", endDate: "2019-02-21T14:34:29.612-0400", device: "watch"}

2: {value: 63, startDate: "2019-02-21T14:32:10.966-0400", endDate: "2019-02-21T14:33:24.543-0400", device: "watch"}

3: {value: 36, startDate: "2019-02-21T14:31:04.984-0400", endDate: "2019-02-21T14:32:10.966-0400", device: "watch"}

4: {value: 118, startDate: "2019-02-21T14:30:02.587-0400", endDate: "2019-02-21T14:31:04.984-0400", device: "watch"}`

My current solution is to monitor the timestamps and make sure they are not overlapping.

Nicholas1490 avatar Feb 21 '19 19:02 Nicholas1490

Any sense of if/when this might be merged? Being able to exclude manually entered data is a very useful feature.

jlewicki-nevo avatar Mar 04 '19 19:03 jlewicki-nevo

This would be very useful.

psousa avatar Mar 27 '19 16:03 psousa

Any progress on this merge?

psousa avatar Apr 17 '19 21:04 psousa

Thanks for your contribution :) I have couple points to discuss/correct

  1. autorisation check was added in another PR
  2. complete docs pls

  1. does this option works for every possible request? Not sure about it from your code.

EJohnF avatar Apr 29 '19 18:04 EJohnF