hello ,
i’m a beginner to react-native and and am working on developing a pedometer app.
am able to get the step count successfully and am trying to store it in the async storage.
But i trying to figure it out that is it possible that instead of taking Date() function
const end = new Date();
const start = new Date();
start.setDate(end.getDate() - 1);
Pedometer.getStepCountAsync(start, end).then(
result => {
this.setState({ pastStepCount: result.steps });
},
error => {
this.setState({
pastStepCount: "Could not get stepCount: " + error
});
}
instead of date, can we use any time() function, does react native support this?
what am trying to figure out is, i need step count for particular amount of time, like for ten min,person walks, he takes rest for some amount of time , then again he walks,
can that be possible?
thank you in advance