Giter Club home page Giter Club logo

Comments (9)

EJohnF avatar EJohnF commented on July 29, 2024 1

Now there is 'tracked' flag to check whether it was logged manually or recorded from sensors.

from react-native-google-fit.

StasDoskalenko avatar StasDoskalenko commented on July 29, 2024

@AadGlasbergen I believe you can filter it by source type

from react-native-google-fit.

neogermi avatar neogermi commented on July 29, 2024

@StasDoskalenko and @AadGlasbergen yes, we have done that directly in the Java code. You can filter for 'user_input' inside StepHistory.java:

+            // check if was manually input
+            DataSource ds = dp.getOriginalDataSource();
+            String streamId = ds.getStreamIdentifier();
+
+            if (streamId.toLowerCase().indexOf("user_input") != -1) {
+              // exclude this from the set
+              Log.i(TAG, "\t\tOriginalSource  : " + streamId + " -> excluded as it was manually entered");
+              continue;
+            }

from react-native-google-fit.

StasDoskalenko avatar StasDoskalenko commented on July 29, 2024

Added TODO: in https://github.com/StasDoskalenko/react-native-google-fit/projects/1

from react-native-google-fit.

winardis avatar winardis commented on July 29, 2024

Hi are there any updates to the filter on manually added entries for the package @StasDoskalenko ?

from react-native-google-fit.

ClementLANGENDORF avatar ClementLANGENDORF commented on July 29, 2024

Hi @StasDoskalenko when do you think this feature will arrive ?
@neogermi In the meantime could you please show me how and where you filter, that would be a great help. 🙏 🙏 🙏

from react-native-google-fit.

neogermi avatar neogermi commented on July 29, 2024

Hi @ClementLANGENDORF ,

sure. All I did was that I basically added the above mentioned code piece in StepHistory.java insice processDtaSet. This then filters for the stream where the data came from. We then filter out everything that was manually added by the user, hence "user_input".

Not the best solution but my Android-code skills are limited :-)

BTW: We then extracted this part with patch-package to apply only our changes on top of the official release. That was quite beneficial.

Hope that helps you.

from react-native-google-fit.

ClementLANGENDORF avatar ClementLANGENDORF commented on July 29, 2024

Thank you @neogermi I will try but I just saw that there was a metode GoogleFit.getUserInputSteps to allow to get the steps, it seems to work well I'll go on it.

my skills in android / java development are not the best for me either

from react-native-google-fit.

PhalugunaRao avatar PhalugunaRao commented on July 29, 2024

@StasDoskalenko and @AadGlasbergen yes, we have done that directly in the Java code. You can filter for 'user_input' inside StepHistory.java:

+            // check if was manually input
+            DataSource ds = dp.getOriginalDataSource();
+            String streamId = ds.getStreamIdentifier();
+
+            if (streamId.toLowerCase().indexOf("user_input") != -1) {
+              // exclude this from the set
+              Log.i(TAG, "\t\tOriginalSource  : " + streamId + " -> excluded as it was manually entered");
+              continue;
+            }

FOR samsung device getting "Samsung Step Counter" it's not user_input

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.