-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
I used these lines of code in my app for getting Steps.
import Pedometer from 'react-native-universal-pedometer';
Pedometer.isStepCountingAvailable((error, isAvailable) => {
if (isAvailable) {
const startDate = new Date();
startDate.setHours(0, 0, 0, 0);
const endDate = new Date();
Pedometer.queryPedometerDataBetweenDates(
startDate.getTime(),
endDate.getTime(),
pedometerData => {
console.log(pedometerData);
},
);
} else {alert("error")}
});
pedometerData always return
{"distance": 0, "endDate": -62508770, "numberOfSteps": 0, "startDate": 0}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels