Closed ronguleria closed 4 years ago
Same here it was not matching with google fit app. Step count is more than what displayed in google fit.
Hey @ronguleria @hemanthkaipaa it could be that there are some duplicates in the entries and Google Fit just takes one. Can you please verify if dateFrom, dateTo for the entries are unique?
As of version 0.0.6 extra field source has been implemented for every data object.
I Will try to get steps on my app but steps did not match with google fit in android code void healthDatareadAll() async { steps=0; if (await FitKit.requestPermissions(DataType.values)) { for (DataType type in DataType.values) { final results = await FitKit.read( type, DateTime(DateTime.now().year,DateTime.now().month,DateTime.now().day-1,0,0,0,0,0,), DateTime.now().subtract(Duration(days: 1)), ); if (type == DataType.STEP_COUNT) { var stepsMap= results.asMap(); for( int i=0;i<stepsMap.length;i++) { steps=steps+stepsMap[i].value; } Fluttertoast.showToast( msg: steps.toString(), toastLength: Toast.LENGTH_SHORT, gravity: ToastGravity.CENTER, timeInSecForIos: 1, backgroundColor: Colors.red, textColor: Colors.white, fontSize: 16.0); } } }