Closed StarksJohn closed 3 years ago
solved, I added this method to the file node_modules/@ovalmoney/react-native-fitness/android/src/main/java/com/ovalmoney/fitness/manager/Manager.java
public void readDailyTotalFromLocalDevice(Context context, final Promise promise){
Task
//[{"endDate":"2020-11-30T13:50:52.044+0800","quantity":701,"startDate":"2020-11-30T06:59:14.358+0800"}]
Log.v("Manager", "readDailyTotalFromLocalDevice steps= "+steps);
promise.resolve(steps);
} catch (InterruptedException e){
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
} catch (TimeoutException e) {
e.printStackTrace();
}
}
because you can add the number of fake steps in Google fit, so how do you make sure you use it Fitness.getSteps () the number of steps obtained is the actual sensor step number, not the number of steps added by the user?