Giter Club home page Giter Club logo

Comments (11)

EJohnF avatar EJohnF commented on September 3, 2024

can you share your code?
But the problem seems out-of-date already...

from react-native-google-fit.

adcuz avatar adcuz commented on September 3, 2024

Possibly related: #32

Related code BMR is being subtracted:

stepMap.putDouble("calorie", dp.getValue(field).asFloat() - basal);

Not sure what exactly the cause is, as I gave up trying to track it down.

from react-native-google-fit.

StasDoskalenko avatar StasDoskalenko commented on September 3, 2024

Looks like we're gathering basal metabolic rate averaged over a week

from react-native-google-fit.

dj-8891 avatar dj-8891 commented on September 3, 2024

Any way we can get the total calories, without BMR reduced from it, i.e., the total calories as showed in the Google Fit app?

from react-native-google-fit.

StasDoskalenko avatar StasDoskalenko commented on September 3, 2024

@dj-8891 sure, I believe we can include some parameter there. Do you have some desirable API?

from react-native-google-fit.

dj-8891 avatar dj-8891 commented on September 3, 2024

For the application I will be working on, I can work with only activity related calories as far as analytics is concerned but when it comes to displaying the details to the user, it would look good if my values match(or are close) with that shown in user's Google Fit app/account. Initially I thought Google doesn't provide with inactive calories in its APIs

from react-native-google-fit.

dj-8891 avatar dj-8891 commented on September 3, 2024

@dj-8891 sure, I believe we can include some parameter there. Do you have some desirable API?

I was also wondering the same, that parameter can be used to trigger if we need to call CalorieHistory - getBasalAVG() or not.

from react-native-google-fit.

vineeth-accolite avatar vineeth-accolite commented on September 3, 2024

@dj-8891 if you are not extracting the basal are you getting the same value which is showing in Google fit App in your app ?
stepMap.putDouble("calorie", dp.getValue(field).asFloat() );

from react-native-google-fit.

dj-8891 avatar dj-8891 commented on September 3, 2024

@vineeth-accolite There is no impact on the results for calories, no matter if we include the basal subtraction or not. The calories values are approx matching with that of Google Fit app apart from current day's calories value.

from react-native-google-fit.

vineeth-accolite avatar vineeth-accolite commented on September 3, 2024

@dj-8891 try passing end date as current datetime and you will get exact value as shown in the google fit app

from react-native-google-fit.

dj-8891 avatar dj-8891 commented on September 3, 2024

@vineeth-accolite Stupid of me.
Thanks, this worked!!

from react-native-google-fit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.