You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let options = {
date: (new Date(timestamp*1000)).toISOString(),
};
AppleHealthKit.getStepCount(options: Object, (err: Object, steps: Object) => {
if(err){
return err;
}
console.log('getStepCount>>', steps); ------------------------------> return step object with value and endDate
});
The text was updated successfully, but these errors were encountered:
aanom
changed the title
getDailyStepCountSamples return empty array as getStepCount return data of same timestamp
getDailyStepCountSamples return empty array as getStepCount return object of stepcount
Jan 21, 2020
GETTING EMPTY ARRAY ( [] ) by calling getDailyStepCountSamples function
timestamp would be 3-4 hrs before the current time,
let options = {
startDate: (new Date(timestamp*1000)).toISOString(), // required
endDate: (new Date()).toISOString() // optional; default now
};
AppleHealthKit.getDailyStepCountSamples(options, async (err, results) => {
if (err) {
console.log('getStepCount err>>', err);
return;
}
console.log('getStepCount>>', results); ------------------------------> return empty array=>[]
}
As,
let options = {
date: (new Date(timestamp*1000)).toISOString(),
};
AppleHealthKit.getStepCount(options: Object, (err: Object, steps: Object) => {
if(err){
return err;
}
console.log('getStepCount>>', steps); ------------------------------> return step object with value and endDate
});
The text was updated successfully, but these errors were encountered: