rn-apple-healthkit
rn-apple-healthkit copied to clipboard
add ability to skip manual steps, distance and climbed activity
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
});
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.
Any sense of if/when this might be merged? Being able to exclude manually entered data is a very useful feature.
This would be very useful.
Any progress on this merge?
Thanks for your contribution :) I have couple points to discuss/correct
- autorisation check was added in another PR
- complete docs pls
- does this option works for every possible request? Not sure about it from your code.